From 83a1f457f6fae054e11314cd7a8949e562fc7eb3 Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Fri, 16 Sep 2022 08:42:51 -0400 Subject: [PATCH] Fix exception class, message in unit test --- test/instance_agent/file_credentials_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/instance_agent/file_credentials_test.rb b/test/instance_agent/file_credentials_test.rb index a25981bf..474500f5 100644 --- a/test/instance_agent/file_credentials_test.rb +++ b/test/instance_agent/file_credentials_test.rb @@ -1,4 +1,5 @@ require 'test_helper' +require 'aws-sdk-core' class FileCredentialsTest < InstanceAgentTestCase context 'With the file credentials' do @@ -52,7 +53,7 @@ class FileCredentialsTest < InstanceAgentTestCase end should 'raise error when credential file is missing' do - assert_raised_with_message("Failed to load credentials from path #{credentials_path}", RuntimeError) do + assert_raised_with_message("Profile `default' not found in #{credentials_path}", Aws::Errors::NoSuchProfileError) do InstanceAgent::FileCredentials.new(credentials_path) end end