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.209.6 test/snapshot/lambda_function_test.rb
instana-1.209.5 test/snapshot/lambda_function_test.rb
instana-1.209.4 test/snapshot/lambda_function_test.rb
instana-1.209.3 test/snapshot/lambda_function_test.rb
instana-1.209.2 test/snapshot/lambda_function_test.rb
instana-1.209.1 test/snapshot/lambda_function_test.rb
instana-1.209.0.pre3 test/snapshot/lambda_function_test.rb
instana-1.209.0.pre2 test/snapshot/lambda_function_test.rb
instana-1.209.0.pre1 test/snapshot/lambda_function_test.rb
instana-1.208.0 test/snapshot/lambda_function_test.rb
instana-1.207.0 test/snapshot/lambda_function_test.rb
instana-1.206.0 test/snapshot/lambda_function_test.rb
instana-1.205.0 test/snapshot/lambda_function_test.rb
instana-1.204.0 test/snapshot/lambda_function_test.rb
instana-1.204.0.pre3 test/snapshot/lambda_function_test.rb
instana-1.204.0.pre2 test/snapshot/lambda_function_test.rb
instana-1.204.0.pre1 test/snapshot/lambda_function_test.rb
instana-1.203.2 test/snapshot/lambda_function_test.rb
instana-1.203.1 test/snapshot/lambda_function_test.rb
instana-1.203.0 test/snapshot/lambda_function_test.rb