test/backend/agent_test.rb in instana-1.197.0 vs test/backend/agent_test.rb in instana-1.198.0.pre1

- old
+ new

@@ -41,9 +41,22 @@ ensure ENV['INSTANA_ENDPOINT_URL'] = nil ENV['ECS_CONTAINER_METADATA_URI'] = nil end + def test_lambda + ENV['_HANDLER'] = 'TEST_FUNCTION' + ENV['INSTANA_ENDPOINT_URL'] = 'http://example.com' + + subject = Instana::Backend::Agent.new + assert_nil subject.delegate + subject.setup + assert subject.delegate.is_a?(Instana::Backend::ServerlessAgent) + ensure + ENV['_HANDLER'] = nil + ENV['INSTANA_ENDPOINT_URL'] = nil + end + def test_delegate_super subject = Instana::Backend::Agent.new assert_raises NoMethodError do subject.invalid end