Skip to content

Commit

Permalink
Merge pull request #200 from cschwede/kuttl-addons
Browse files Browse the repository at this point in the history
 Add kuttl test to ensure container commands are correct
  • Loading branch information
openshift-merge-bot[bot] authored Apr 12, 2024
2 parents 833995f + 4ebda5d commit 4de3d73
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
81 changes: 81 additions & 0 deletions tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions tests/kuttl/tests/basic-deploy/03-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions tests/kuttl/tests/basic-deploy_tls/02-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions tests/kuttl/tests/replication/04-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4de3d73

Please sign in to comment.