From a8d8bae8a370c22c40f2d4880ad7ade196a6f472 Mon Sep 17 00:00:00 2001 From: Delaine Rogers Date: Wed, 23 Sep 2026 16:40:45 -0700 Subject: [PATCH] fix tests --- plugin/service/host/plugin_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/service/host/plugin_test.go b/plugin/service/host/plugin_test.go index 6fd77f0..ac5e258 100644 --- a/plugin/service/host/plugin_test.go +++ b/plugin/service/host/plugin_test.go @@ -1126,6 +1126,16 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) { }, }, }, + // ValidateCreds is called for DynamicAWS credentials before the dry-run + // DescribeInstances. Provide a mock STS that returns a successful AssumeRole + // so the validate step passes and execution reaches the EC2 mock. + credOpts: []credential.AwsCredentialPersistedStateOption{ + credential.WithStateTestOpts([]awsutil.Option{ + awsutil.WithSTSAPIFunc(awsutil.NewMockSTS( + awsutil.WithAssumeRoleOutput(validAssumeRoleOutput()), + )), + }), + }, catalogOpts: []awsCatalogPersistedStateOption{ withTestEC2APIFunc(newTestMockEC2( nil,