Skip to content

Commit f05903c

Browse files
Wei WengWei Weng
authored andcommitted
fix error message
Signed-off-by: Wei Weng <[email protected]>
1 parent 4521ed4 commit f05903c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/hubagent/options/validation_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func TestValidateControllerManagerConfiguration(t *testing.T) {
104104
}),
105105
want: field.ErrorList{
106106
field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWebhook to be true (cert-manager is only used for webhook certificate management)"),
107-
field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (cert-manager pods need to run in the hub cluster)"),
107+
field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (when EnableWorkload is false, a validating webhook blocks pod creation except for certain system pods; cert-manager controller pods must be allowed to run in the hub cluster)"),
108108
},
109109
},
110110
"UseCertManager with EnableWebhook": {
@@ -113,7 +113,7 @@ func TestValidateControllerManagerConfiguration(t *testing.T) {
113113
option.WebhookServiceName = testWebhookServiceName
114114
option.UseCertManager = true
115115
}),
116-
want: field.ErrorList{field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (cert-manager pods need to run in the hub cluster)")},
116+
want: field.ErrorList{field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (when EnableWorkload is false, a validating webhook blocks pod creation except for certain system pods; cert-manager controller pods must be allowed to run in the hub cluster)")},
117117
},
118118
"UseCertManager without EnableWorkload": {
119119
opt: newTestOptions(func(option *Options) {
@@ -122,7 +122,7 @@ func TestValidateControllerManagerConfiguration(t *testing.T) {
122122
option.UseCertManager = true
123123
option.EnableWorkload = false
124124
}),
125-
want: field.ErrorList{field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (cert-manager pods need to run in the hub cluster)")},
125+
want: field.ErrorList{field.Invalid(newPath.Child("UseCertManager"), true, "UseCertManager requires EnableWorkload to be true (when EnableWorkload is false, a validating webhook blocks pod creation except for certain system pods; cert-manager controller pods must be allowed to run in the hub cluster)")},
126126
},
127127
"UseCertManager with EnableWebhook and EnableWorkload": {
128128
opt: newTestOptions(func(option *Options) {

0 commit comments

Comments
 (0)