From 932900f33f78f2a9540a2b6eea257eb65db24e97 Mon Sep 17 00:00:00 2001 From: Andi Titu Date: Mon, 19 Jun 2023 18:09:43 +0200 Subject: [PATCH] fix test --- plugins/aws/access_key_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/aws/access_key_test.go b/plugins/aws/access_key_test.go index 67e582daf..302bfab2d 100644 --- a/plugins/aws/access_key_test.go +++ b/plugins/aws/access_key_test.go @@ -252,6 +252,16 @@ func TestAccessKeyDefaultProvisioner(t *testing.T) { configPath := filepath.Join(t.TempDir(), "awsConfig") t.Setenv("AWS_CONFIG_FILE", configPath) + // setup profiles in config file + file := ini.Empty() + profileDefault, err := file.NewSection("default") + require.NoError(t, err) + _, err = profileDefault.NewKey("region", "us-central-1") + require.NoError(t, err) + + err = file.SaveTo(configPath) + require.NoError(t, err) + plugintest.TestProvisioner(t, AccessKey().DefaultProvisioner, map[string]plugintest.ProvisionCase{ "default": { ItemFields: map[sdk.FieldName]string{