@@ -19,19 +19,19 @@ var (
1919 },
2020 Key : "access-key-id" ,
2121 }
22- testSecretAccessKeyRef = cmmeta.SecretKeySelector {
22+ testAccessKeySecretRef = cmmeta.SecretKeySelector {
2323 LocalObjectReference : cmmeta.LocalObjectReference {
2424 Name : "alidns-secret" ,
2525 },
26- Key : "secret- access-key" ,
26+ Key : "access-key-secret " ,
2727 }
2828)
2929
3030func TestConfig_Validate (t * testing.T ) {
3131 t .Run ("happy" , func (t * testing.T ) {
3232 correct := & Config {
3333 AccessKeyIdRef : testAccessKeyIdRef ,
34- SecretAccessKeyRef : testSecretAccessKeyRef ,
34+ AccessKeySecretRef : testAccessKeySecretRef ,
3535 }
3636
3737 loaded , err := loadConfig (& extapi.JSON {Raw : mustMarshal (correct )})
@@ -43,7 +43,7 @@ func TestConfig_Validate(t *testing.T) {
4343 t .Run ("compatible" , func (t * testing.T ) {
4444 correct := & Config {
4545 AccessKeyIdRef : testAccessKeyIdRef ,
46- AccessKeySecretRef : testSecretAccessKeyRef ,
46+ SecretAccessKeyRef : testAccessKeySecretRef ,
4747 }
4848
4949 loaded , err := loadConfig (& extapi.JSON {Raw : mustMarshal (correct )})
@@ -59,14 +59,14 @@ func TestConfig_Validate(t *testing.T) {
5959
6060 t .Run ("no accessKeyId" , func (t * testing.T ) {
6161 bad := & Config {
62- SecretAccessKeyRef : testSecretAccessKeyRef ,
62+ SecretAccessKeyRef : testAccessKeySecretRef ,
6363 }
6464
6565 _ , err := loadConfig (& extapi.JSON {Raw : mustMarshal (bad )})
6666 assert .Error (t , err )
6767 })
6868
69- t .Run ("no secretAccessKey " , func (t * testing.T ) {
69+ t .Run ("no accessKeySecret " , func (t * testing.T ) {
7070 bad := & Config {
7171 AccessKeyIdRef : testAccessKeyIdRef ,
7272 }
0 commit comments