зеркало из https://github.com/Azure/ARO-RP.git
MaintenanceTask is cleared after run pass/failure
This commit is contained in:
Родитель
78cb05e270
Коммит
22ba7801bf
|
@ -167,7 +167,7 @@ func TestBackendTry(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "StateAdminUpdating success sets the last ProvisioningState and clears LastAdminUpdateError",
|
||||
name: "StateAdminUpdating success sets the last ProvisioningState and clears LastAdminUpdateError and MaintenanceTask",
|
||||
fixture: func(f *testdatabase.Fixture) {
|
||||
f.AddOpenShiftClusterDocuments(&api.OpenShiftClusterDocument{
|
||||
Key: strings.ToLower(resourceID),
|
||||
|
@ -180,6 +180,7 @@ func TestBackendTry(t *testing.T) {
|
|||
ProvisioningState: api.ProvisioningStateAdminUpdating,
|
||||
LastProvisioningState: api.ProvisioningStateSucceeded,
|
||||
LastAdminUpdateError: "oh no",
|
||||
MaintenanceTask: api.MaintenanceTaskEverything,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -219,6 +220,7 @@ func TestBackendTry(t *testing.T) {
|
|||
ProvisioningState: api.ProvisioningStateAdminUpdating,
|
||||
LastProvisioningState: api.ProvisioningStateSucceeded,
|
||||
FailedProvisioningState: api.ProvisioningStateUpdating,
|
||||
MaintenanceTask: api.MaintenanceTaskEverything,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -306,6 +306,7 @@ func (c *openShiftClusters) EndLease(ctx context.Context, key string, provisioni
|
|||
return c.patchWithLease(ctx, key, func(doc *api.OpenShiftClusterDocument) error {
|
||||
doc.OpenShiftCluster.Properties.ProvisioningState = provisioningState
|
||||
doc.OpenShiftCluster.Properties.FailedProvisioningState = failedProvisioningState
|
||||
doc.OpenShiftCluster.Properties.MaintenanceTask = ""
|
||||
|
||||
doc.LeaseOwner = ""
|
||||
doc.LeaseExpires = 0
|
||||
|
|
Загрузка…
Ссылка в новой задаче