Sha256: c0e5b526446a44ef19231381c84a07b3d7a1bf2e10b2874f9905277727a92e8d

Contents?: true

Size: 1007 Bytes

Versions: 54

Compression:

Stored size: 1007 Bytes

Contents

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021

require 'test_helper'

class LambdaFunctionTest < Minitest::Test
  def setup
    @subject = Instana::Snapshot::LambdaFunction.new
  end

  def test_snapshot
    Thread.current[:instana_function_arn] = 'test'

    assert_equal Instana::Snapshot::LambdaFunction::ID, @subject.snapshot[:name]
    assert_equal Thread.current[:instana_function_arn], @subject.snapshot[:entityId]
  ensure
    Thread.current[:instana_function_arn] = nil
  end

  def test_source
    Thread.current[:instana_function_arn] = 'test'

    assert @subject.source[:hl]
    assert_equal 'aws', @subject.source[:cp]
    assert_equal Thread.current[:instana_function_arn], @subject.source[:e]
  ensure
    Thread.current[:instana_function_arn] = nil
  end

  def test_host_name
    Thread.current[:instana_function_arn] = 'test'

    assert_equal Thread.current[:instana_function_arn], @subject.host_name
  ensure
    Thread.current[:instana_function_arn] = nil
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
instana-1.217.1 test/snapshot/lambda_function_test.rb
instana-1.217.0 test/snapshot/lambda_function_test.rb
instana-1.216.0 test/snapshot/lambda_function_test.rb
instana-1.215.1 test/snapshot/lambda_function_test.rb
instana-1.215.0 test/snapshot/lambda_function_test.rb
instana-1.214.4 test/snapshot/lambda_function_test.rb
instana-1.214.3 test/snapshot/lambda_function_test.rb
instana-1.214.2 test/snapshot/lambda_function_test.rb
instana-1.214.1 test/snapshot/lambda_function_test.rb
instana-1.214.0 test/snapshot/lambda_function_test.rb
instana-1.213.3 test/snapshot/lambda_function_test.rb
instana-1.213.2 test/snapshot/lambda_function_test.rb
instana-1.213.1 test/snapshot/lambda_function_test.rb
instana-1.213.0 test/snapshot/lambda_function_test.rb
instana-1.212.0 test/snapshot/lambda_function_test.rb
instana-1.211.0 test/snapshot/lambda_function_test.rb
instana-1.210.1 test/snapshot/lambda_function_test.rb
instana-1.210.0 test/snapshot/lambda_function_test.rb
instana-1.209.8 test/snapshot/lambda_function_test.rb
instana-1.209.7 test/snapshot/lambda_function_test.rb