Skip to content

Commit

Permalink
Reorganize kuttl tests for nova-cell-deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkisaolamb committed Sep 27, 2024
1 parent f188883 commit 8625719
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
10 changes: 4 additions & 6 deletions controllers/nova_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,12 +763,6 @@ func (r *NovaReconciler) ensureCellDeleted(
return err
}

// Delete secrets
dbSecret := fmt.Sprintf("%s-db-secret", cell.Name)
err = secret.DeleteSecretsWithName(ctx, h, dbSecret, instance.Namespace)
if err != nil {
return err
}
secretName := getNovaCellCRName(instance.Name, cellName)
err = secret.DeleteSecretsWithName(ctx, h, secretName, instance.Namespace)
if err != nil {
Expand All @@ -784,6 +778,10 @@ func (r *NovaReconciler) ensureCellDeleted(
}
err = r.Client.Delete(ctx, transportURL)

if err != nil {
return err
}

err = DeleteDatabaseAndAccountFinalizers(ctx, h, dbName, accountName, instance.ObjectMeta.Namespace)

if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ status:
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
namespaced: true
commands:
- command: echo oc get -n $NAMESPACE pod/nova-kuttl-cell1-novncproxy-0 --ignore-not-found
- command: echo oc get -n $NAMESPACE pod/nova-kuttl-cell1-conductor-0--ignore-not-found
- script: |
oc get -n nova-kuttl-default pod/nova-kuttl-cell1-novncproxy-0 || exit 0
exit 1
- script: |
oc get -n nova-kuttl-default pod/nova-kuttl-cell1-conductor-0 || exit 0
exit 1

0 comments on commit 8625719

Please sign in to comment.