Sha256: 4e13d4b6fd6985858bad8da383686a5f96f4ee470c1c976fbf0bc2b0e9d179df
Contents?: true
Size: 946 Bytes
Versions: 10
Compression:
Stored size: 946 Bytes
Contents
gem 'minitest' require 'minitest/autorun' require 'bib/opsworks/newrelic' class NewrelicTest < Minitest::Test def test_publish_deployment newrelic = Bib::Opsworks::Newrelic.new deploy_data = { 'deploying_user' => 'arn:aws:iam::123456:user/gemtest', 'scm' => { 'revision' => 'rev1' } } app_name = 'unittest' result = newrelic.prepare_publishing_data(app_name, deploy_data) expected = {"deployment[app_name]"=>"unittest", "deployment[user]"=>"gemtest", "deployment[revision]"=>"rev1"} assert_equal(expected, result) end def test_publish_deployment_nouser newrelic = Bib::Opsworks::Newrelic.new deploy_data = { 'scm' => { 'revision' => 'rev1' } } app_name = 'unittest' result = newrelic.prepare_publishing_data(app_name, deploy_data) expected = {"deployment[app_name]"=>"unittest", "deployment[user]"=>"opsworks", "deployment[revision]"=>"rev1"} assert_equal(expected, result) end end
Version data entries
10 entries across 10 versions & 1 rubygems