Add test to verify provisionedBy is not changeable in the admin API

This commit is contained in:
Amber Brown 2020-07-01 12:42:45 +10:00
Родитель 4ee55a88b3
Коммит 74671524e7
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -468,6 +468,20 @@ func TestOpenShiftClusterStaticValidateDelta(t *testing.T) {
modify: func(oc *OpenShiftCluster) { oc.Properties.StorageSuffix = "invalid" },
wantErr: "400: PropertyChangeNotAllowed: properties.storageSuffix: Changing property 'properties.storageSuffix' is not allowed.",
},
{
name: "provisionedBy change is not allowed",
oc: func() *OpenShiftCluster {
return &OpenShiftCluster{
Properties: OpenShiftClusterProperties{
ProvisionedBy: "somesha",
},
}
},
modify: func(oc *OpenShiftCluster) {
oc.Properties.ProvisionedBy = "someothersha"
},
wantErr: "400: PropertyChangeNotAllowed: properties.provisionedBy: Changing property 'properties.provisionedBy' is not allowed.",
},
}
for _, tt := range tests {