Skip to content

Commit

Permalink
fix steep errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akumar1214 committed Nov 1, 2024
1 parent fee5a36 commit 3118b9b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module Aws
module CloudWatch
class Client
def initialize: () -> void
def get_metric_data: (::Hash[::Symbol, (::Time | ::Array[::Hash[::Symbol, (::String | bool)]])]) -> Types::MetricDataResponse
end

module Types
class MetricDataResponse
attr_accessor metric_data_results: ::Array[{values: ::Float}]
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module ElasticGraph
current_concurrency: ::Integer
) -> void

def log_pause: (::String) -> void
def log_pause: (::Float) -> void

def log_reset: () -> void

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

require "aws-sdk-lambda"
require "aws-sdk-sqs"
require "aws-sdk-cloudwatch"
require "elastic_graph/spec_support/lambda_function"

RSpec.describe "Autoscale indexer lambda function" do
Expand All @@ -24,9 +25,11 @@
end

lambda_client = ::Aws::Lambda::Client.new(stub_responses: true)
cloudwatch_client = ::Aws::CloudWatch::Client.new(stub_responses: true)

allow(::Aws::SQS::Client).to receive(:new).and_return(sqs_client)
allow(::Aws::Lambda::Client).to receive(:new).and_return(lambda_client)
allow(::Aws::CloudWatch::Client).to receive(:new).and_return(cloudwatch_client)

expect_loading_lambda_to_define_constant(
lambda: "elastic_graph/indexer_autoscaler_lambda/lambda_function.rb",
Expand Down

0 comments on commit 3118b9b

Please sign in to comment.