Преглед изворни кода

Make lint

Signed-off-by: Lilly Daniell <lilly.daniell@engineerbetter.com>
Lilly Daniell пре 3 година
родитељ
комит
8ee6bf896b

+ 3 - 3
pkg/provider/aws/secretsmanager/fake/fake.go

@@ -25,9 +25,9 @@ import (
 
 // Client implements the aws secretsmanager interface.
 type Client struct {
-	ExecutionCounter          int
-	valFn                     map[string]func(*awssm.GetSecretValueInput) (*awssm.GetSecretValueOutput, error)
-	CreateSecretWithContextFn CreateSecretWithContextFn
+	ExecutionCounter            int
+	valFn                       map[string]func(*awssm.GetSecretValueInput) (*awssm.GetSecretValueOutput, error)
+	CreateSecretWithContextFn   CreateSecretWithContextFn
 	GetSecretValueWithContextFn GetSecretValueWithContextFn
 }
 

+ 7 - 8
pkg/provider/aws/secretsmanager/secretsmanager_test.go

@@ -328,11 +328,10 @@ func (f fakeRef) GetRemoteKey() string {
 	return f.key
 }
 
-
 func TestSetSecret(t *testing.T) {
 	secretName := "fake-key"
 	noPermission := errors.New("no permission")
-	versionId := "384898A7-A5AE-4775-A08D-B417B059ED11"
+	versionID := "384898A7-A5AE-4775-A08D-B417B059ED11"
 	versionStages := "AWSCURRENT"
 	versionOutput := []*string{&versionStages}
 
@@ -341,8 +340,8 @@ func TestSetSecret(t *testing.T) {
 	}
 
 	secretValueOutput := &awssm.GetSecretValueOutput{
-		Name: &secretName,
-		VersionId: &versionId,
+		Name:          &secretName,
+		VersionId:     &versionID,
 		VersionStages: versionOutput,
 	}
 
@@ -365,7 +364,7 @@ func TestSetSecret(t *testing.T) {
 				store: makeValidSecretStore().Spec.Provider.AWS,
 				client: fakesm.Client{
 					GetSecretValueWithContextFn: fakesm.NewGetSecretValueWithContextFn(secretValueOutput, nil),
-					CreateSecretWithContextFn: fakesm.NewCreateSecretWithContextFn(secretOutput, nil),
+					CreateSecretWithContextFn:   fakesm.NewCreateSecretWithContextFn(secretOutput, nil),
 				},
 			},
 			want: want{
@@ -373,12 +372,12 @@ func TestSetSecret(t *testing.T) {
 			},
 		},
 		"SetSecretCreateSecretFails": {
-			reason: "create secret returns an error if it fails",
+			reason: "CreateSecretWithContext returns an error if it fails",
 			args: args{
 				store: makeValidSecretStore().Spec.Provider.AWS,
 				client: fakesm.Client{
 					GetSecretValueWithContextFn: fakesm.NewGetSecretValueWithContextFn(secretValueOutput, nil),
-					CreateSecretWithContextFn: fakesm.NewCreateSecretWithContextFn(nil, noPermission),
+					CreateSecretWithContextFn:   fakesm.NewCreateSecretWithContextFn(nil, noPermission),
 				},
 			},
 			want: want{
@@ -387,7 +386,7 @@ func TestSetSecret(t *testing.T) {
 		},
 		"SetSecretGetSecretFails": {
 			reason: "GetSecretValueWithContext returns an error if it fails",
-			args: args {
+			args: args{
 				store: makeValidSecretStore().Spec.Provider.AWS,
 				client: fakesm.Client{
 					GetSecretValueWithContextFn: fakesm.NewGetSecretValueWithContextFn(nil, noPermission),