-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from jparoly/kuttl_2
Add kuttl tests
- Loading branch information
Showing
6 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# EXECUTION (from install_yamls repo root): | ||
# | ||
# make swift_kuttl | ||
# | ||
# ASSUMPTIONS: | ||
# | ||
# 1. Latest version of kuttl is installed at /usr/local/bin/kubectl-kuttl | ||
# - wget https://github.com/kudobuilder/kuttl/releases/download/v0.11.1/kubectl-kuttl_0.11.1_linux_x86_64 | ||
# - mv kubectl-kuttl_0.11.1_linux_x86_64 /usr/local/bin/kubectl-kuttl | ||
# - chmod 755 /usr/local/bin/kubectl-kuttl | ||
# 2. An OCP 4.10+ CRC cluster with Podified Operators has been deployed | ||
# 3. CLI user has access to $KUBECONFIG | ||
# 4. The environment variable INSTALL_YAMLS is set to the the path of the | ||
# install_yamls repo | ||
|
||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestSuite | ||
reportFormat: JSON | ||
reportName: kuttl-test-swift | ||
namespace: swift-kuttl-tests | ||
timeout: 600 | ||
parallel: 1 | ||
suppress: | ||
- events # Remove spammy event logs |
54 changes: 54 additions & 0 deletions
54
tests/kuttl/tests/basic-deploy/01-assert-deploy-swift.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apiVersion: swift.openstack.org/v1beta1 | ||
kind: Swift | ||
metadata: | ||
name: swift | ||
spec: | ||
swiftRing: | ||
ringReplicas: 1 | ||
containerImage: quay.io/podified-antelope-centos9/openstack-swift-proxy-server:current-podified | ||
swiftStorage: | ||
storageClass: local-storage | ||
replicas: 1 | ||
containerImageAccount: quay.io/podified-antelope-centos9/openstack-swift-account:current-podified | ||
containerImageContainer: quay.io/podified-antelope-centos9/openstack-swift-container:current-podified | ||
containerImageObject: quay.io/podified-antelope-centos9/openstack-swift-object:current-podified | ||
containerImageProxy: quay.io/podified-antelope-centos9/openstack-swift-proxy-server:current-podified | ||
containerImageMemcached: quay.io/podified-antelope-centos9/openstack-memcached:current-podified | ||
swiftProxy: | ||
replicas: 1 | ||
passwordSelectors: | ||
service: SwiftPassword | ||
status: | ||
conditions: | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: Ready | ||
- message: RoleBinding created | ||
reason: Ready | ||
status: "True" | ||
type: RoleBindingReady | ||
- message: Role created | ||
reason: Ready | ||
status: "True" | ||
type: RoleReady | ||
- message: ServiceAccount created | ||
reason: Ready | ||
status: "True" | ||
type: ServiceAccountReady | ||
- message: Service config create completed | ||
reason: Ready | ||
status: "True" | ||
type: ServiceConfigReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: SwiftProxyReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: SwiftRingReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: SwiftStorageReady |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: | | ||
oc apply -n $NAMESPACE -f ../../../../config/samples/swift_v1beta1_swift.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: swift.openstack.org/v1beta1 | ||
kind: Swift | ||
name: swift | ||
commands: | ||
- script: | | ||
oc delete --ignore-not-found=true -n $NAMESPACE pvc srv-swift-storage-0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: swift.openstack.org/v1beta1 | ||
kind: Swift | ||
metadata: | ||
name: swift | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: SwiftProxy | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: swift-storage-0 |