From 6946308d26182ad2264aa4fd3fc5d7d7e736b3bc Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 17:26:26 +0100 Subject: [PATCH] Use new methods for all user models --- pkg/datasources/users_acceptance_test.go | 12 ++++++------ .../legacy_service_user_acceptance_test.go | 8 ++++---- pkg/resources/service_user_acceptance_test.go | 8 ++++---- pkg/resources/user_acceptance_test.go | 14 +++++++------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pkg/datasources/users_acceptance_test.go b/pkg/datasources/users_acceptance_test.go index 69b687a9cc..e4355d8f79 100644 --- a/pkg/datasources/users_acceptance_test.go +++ b/pkg/datasources/users_acceptance_test.go @@ -46,8 +46,8 @@ func TestAcc_Users_PersonUser(t *testing.T) { WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). WithMinsToBypassMfa(10). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment). WithDisableMfa("true") @@ -204,8 +204,8 @@ func TestAcc_Users_ServiceUser(t *testing.T) { WithDefaultNamespace("some.namespace"). WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment) resource.Test(t, resource.TestCase{ @@ -364,8 +364,8 @@ func TestAcc_Users_LegacyServiceUser(t *testing.T) { WithDefaultNamespace("some.namespace"). WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment) resource.Test(t, resource.TestCase{ diff --git a/pkg/resources/legacy_service_user_acceptance_test.go b/pkg/resources/legacy_service_user_acceptance_test.go index 1931d4a1dc..f078648ddc 100644 --- a/pkg/resources/legacy_service_user_acceptance_test.go +++ b/pkg/resources/legacy_service_user_acceptance_test.go @@ -56,8 +56,8 @@ func TestAcc_LegacyServiceUser_BasicFlows(t *testing.T) { WithDefaultNamespace("some.namespace"). WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment) userModelAllAttributesChanged := func(loginName string) *model.LegacyServiceUserModel { @@ -74,8 +74,8 @@ func TestAcc_LegacyServiceUser_BasicFlows(t *testing.T) { WithDefaultNamespace("one_part_namespace"). WithDefaultRole("other_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key2)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key1)). + WithRsaPublicKey(key2). + WithRsaPublicKey2(key1). WithComment(newComment) } diff --git a/pkg/resources/service_user_acceptance_test.go b/pkg/resources/service_user_acceptance_test.go index 319b8ab61c..d511079981 100644 --- a/pkg/resources/service_user_acceptance_test.go +++ b/pkg/resources/service_user_acceptance_test.go @@ -51,8 +51,8 @@ func TestAcc_ServiceUser_BasicFlows(t *testing.T) { WithDefaultNamespace("some.namespace"). WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment) userModelAllAttributesChanged := func(loginName string) *model.ServiceUserModel { @@ -67,8 +67,8 @@ func TestAcc_ServiceUser_BasicFlows(t *testing.T) { WithDefaultNamespace("one_part_namespace"). WithDefaultRole("other_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key2)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key1)). + WithRsaPublicKey(key2). + WithRsaPublicKey2(key1). WithComment(newComment) } diff --git a/pkg/resources/user_acceptance_test.go b/pkg/resources/user_acceptance_test.go index 373e5b6914..4f75ab59ef 100644 --- a/pkg/resources/user_acceptance_test.go +++ b/pkg/resources/user_acceptance_test.go @@ -64,8 +64,8 @@ func TestAcc_User_BasicFlows(t *testing.T) { WithDefaultRole("some_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). WithMinsToBypassMfa(10). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key1)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key2)). + WithRsaPublicKey(key1). + WithRsaPublicKey2(key2). WithComment(comment). WithDisableMfa("true") @@ -87,8 +87,8 @@ func TestAcc_User_BasicFlows(t *testing.T) { WithDefaultRole("other_role"). WithDefaultSecondaryRolesOptionEnum(sdk.SecondaryRolesOptionAll). WithMinsToBypassMfa(14). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key2)). - WithRsaPublicKey2Value(config.MultilineWrapperVariable(key1)). + WithRsaPublicKey(key2). + WithRsaPublicKey2(key1). WithComment(newComment). WithDisableMfa("false") } @@ -696,15 +696,15 @@ func TestAcc_User_issue2970(t *testing.T) { userModel := model.User(resourceName, userId.Name()). WithPassword(pass). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(key)) + WithRsaPublicKey(key) newUserModelIncorrectNewKey := model.User(resourceName, userId.Name()). WithPassword(newPass). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(incorrectlyFormattedNewKey)) + WithRsaPublicKey(incorrectlyFormattedNewKey) newUserModel := model.User(resourceName, userId.Name()). WithPassword(newPass). - WithRsaPublicKeyValue(config.MultilineWrapperVariable(newKey)) + WithRsaPublicKey(newKey) resource.Test(t, resource.TestCase{ ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories,