diff --git a/tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml b/tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml index 1b49ce15..facc165f 100644 --- a/tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml +++ b/tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml @@ -74,6 +74,86 @@ metadata: component: swift-storage service: swift name: swift-storage-0 +spec: + containers: + - command: + - /usr/bin/swift-account-server + - /etc/swift/account-server.conf.d + - -v + name: account-server + - command: + - /usr/bin/swift-account-replicator + - /etc/swift/account-server.conf.d + - -v + name: account-replicator + - command: + - /usr/bin/swift-account-auditor + - /etc/swift/account-server.conf.d + - -v + name: account-auditor + - command: + - /usr/bin/swift-account-reaper + - /etc/swift/account-server.conf.d + - -v + name: account-reaper + - command: + - /usr/bin/swift-container-server + - /etc/swift/container-server.conf.d + - -v + name: container-server + - command: + - /usr/bin/swift-container-replicator + - /etc/swift/container-server.conf.d + - -v + name: container-replicator + - command: + - /usr/bin/swift-container-auditor + - /etc/swift/container-server.conf.d + - -v + name: container-auditor + - command: + - /usr/bin/swift-container-updater + - /etc/swift/container-server.conf.d + - -v + name: container-updater + - command: + - /usr/bin/swift-object-server + - /etc/swift/object-server.conf.d + - -v + name: object-server + - command: + - /usr/bin/swift-object-replicator + - /etc/swift/object-server.conf.d + - -v + name: object-replicator + - command: + - /usr/bin/swift-object-auditor + - /etc/swift/object-server.conf.d + - -v + name: object-auditor + - command: + - /usr/bin/swift-object-updater + - /etc/swift/object-server.conf.d + - -v + name: object-updater + - command: + - /usr/bin/swift-object-expirer + - /etc/swift/object-expirer.conf.d + - -v + name: object-expirer + - command: + - /usr/bin/rsync + - --daemon + - --no-detach + - --config=/etc/swift/rsyncd.conf + - --log-file=/dev/stdout + name: rsync + - command: + - sh + - -c + - while true; do /usr/bin/swift-recon-cron /etc/swift/object-server.conf.d + -v; sleep 300; done + name: swift-recon-cron status: containerStatuses: - name: account-auditor @@ -140,5 +220,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert commands: - script: | + oc rollout status deployment -n $NAMESPACE swift-proxy podname=$(oc get pod -n $NAMESPACE -l component=swift-proxy | grep Running | cut -f 1 -d " ") oc rsh -n $NAMESPACE -c proxy-server "$podname" /bin/sh -c "grep 'Additional proxy config' /etc/swift/proxy-server.conf.d/01-proxy-server.conf" diff --git a/tests/kuttl/tests/basic-deploy/03-cleanup.yaml b/tests/kuttl/tests/basic-deploy/03-cleanup.yaml index 51f94a4d..f5d72c80 100644 --- a/tests/kuttl/tests/basic-deploy/03-cleanup.yaml +++ b/tests/kuttl/tests/basic-deploy/03-cleanup.yaml @@ -9,3 +9,4 @@ commands: oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-0 oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-1 oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-2 + for pv in $(oc get pv | grep "Released.*swift" | cut -f 1 -d " "); do oc patch pv $pv -p '{"spec":{"claimRef": null}}'; done diff --git a/tests/kuttl/tests/basic-deploy_tls/02-cleanup.yaml b/tests/kuttl/tests/basic-deploy_tls/02-cleanup.yaml index f67f6bfa..5af5d4e0 100644 --- a/tests/kuttl/tests/basic-deploy_tls/02-cleanup.yaml +++ b/tests/kuttl/tests/basic-deploy_tls/02-cleanup.yaml @@ -7,3 +7,4 @@ delete: commands: - script: | oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-0 + for pv in $(oc get pv | grep "Released.*swift" | cut -f 1 -d " "); do oc patch pv $pv -p '{"spec":{"claimRef": null}}'; done diff --git a/tests/kuttl/tests/replication/04-cleanup.yaml b/tests/kuttl/tests/replication/04-cleanup.yaml index 51f94a4d..f5d72c80 100644 --- a/tests/kuttl/tests/replication/04-cleanup.yaml +++ b/tests/kuttl/tests/replication/04-cleanup.yaml @@ -9,3 +9,4 @@ commands: oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-0 oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-1 oc delete --ignore-not-found=true -n $NAMESPACE pvc swift-swift-storage-2 + for pv in $(oc get pv | grep "Released.*swift" | cut -f 1 -d " "); do oc patch pv $pv -p '{"spec":{"claimRef": null}}'; done