William Young 3 лет назад
Родитель
Сommit
4427011646
1 измененных файлов с 15 добавлено и 16 удалено
  1. 15 16
      pkg/provider/vault/vault_test.go

+ 15 - 16
pkg/provider/vault/vault_test.go

@@ -1484,7 +1484,6 @@ func TestSetSecret(t *testing.T) {
 		err error
 		// val map[string][]byte
 	}
-	noPermission := "no permission to write"
 	tests := map[string]struct {
 		reason string
 		args   args
@@ -1534,23 +1533,23 @@ func TestSetSecret(t *testing.T) {
 				err: nil,
 			},
 		},
-		// "SetSecretEqualPushSecretWithError": {
-		// 	reason: "vault secret kv equals secret to push kv with write error",
-		// 	args: args{
-		// 		store: makeValidSecretStoreWithVersion(esv1beta1.VaultKVStoreV2).Spec.Provider.Vault,
-		// 		vLogical: &fake.Logical{
-		// 			WriteWithContextFn: fake.NewWriteWithContextFn(nil, fmt.Errorf(noPermission)),
-		// 			ReadWithDataWithContextFn: fake.NewReadWithContextFn(map[string]interface{}{
-		// 				"data": map[string]interface{}{
-		// 					"fake-key": "fake-value",
-		// 				},
-		// 			}, nil),
+		// 	"SetSecretEqualPushSecretWithError": {
+		// 		reason: "vault secret kv equals secret to push kv with write error",
+		// 		args: args{
+		// 			store: makeValidSecretStoreWithVersion(esv1beta1.VaultKVStoreV2).Spec.Provider.Vault,
+		// 			vLogical: &fake.Logical{
+		// 				WriteWithContextFn: fake.NewWriteWithContextFn(nil, fmt.Errorf("no persmissions")),
+		// 				ReadWithDataWithContextFn: fake.NewReadWithContextFn(map[string]interface{}{
+		// 					"data": map[string]interface{}{
+		// 						"fake-key": "fake-value",
+		// 					},
+		// 				}, nil),
+		// 			},
+		// 		},
+		// 		want: want{
+		// 			err: errors.New("no persmissions"),
 		// 		},
 		// 	},
-		// 	want: want{
-		// 		err: errors.New(noPermission),
-		// 	},
-		// },
 	}
 
 	// func TestSetSecretEqualsPushSecretWithError(t *testing.T) {