You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor openstack_kuttl targets so they can be run individually
The setup of the Makefile targets for running the openstack-operator
kuttl tests made it more difficult to run individual tests, pass
individual cli args to kuttl, and run tests from a modified
openstack-oeprator checkout.
After this refactor, kuttl tests are more easily run like:
[stack@host06 install_yamls]$ make openstack_kuttl_prep
[stack@host06 install_yamls]$ cd ../openstack-operator
[stack@host06 openstack-operator]$ bin/kubectl-kuttl test --config kuttl-test.yaml test/kuttl/tests --test dataplane-create-test
[stack@host06 install_yamls]$ cd ../install_yamls
[stack@host06 install_yamls]$ make openstack_kuttl_cleanup
Also cleans up the old ansibleee targets since that operator has been
removed.
Signed-off-by: James Slagle <jslagle@redhat.com>
@@ -1994,33 +1982,6 @@ heat_kuttl: kuttl_common_prep heat heat_deploy_prep ## runs kuttl tests for the
1994
1982
.PHONY: heat_kuttl_crc
1995
1983
heat_kuttl_crc: crc_storage heat_kuttl
1996
1984
1997
-
.PHONY: ansibleee_kuttl_run
1998
-
ansibleee_kuttl_run: ## runs kuttl tests for the openstack-ansibleee operator, assumes that everything needed for running the test was deployed beforehand.
1999
-
ANDIBLEEE_KUTTL_DIR=${ANSIBLEEE_KUTTL_DIR} kubectl-kuttl test --config ${ANSIBLEEE_KUTTL_CONF}${ANSIBLEEE_KUTTL_DIR} --namespace ${NAMESPACE}$(KUTTL_ARGS)
ansibleee_kuttl: input ansibleee_kuttl_prep ansibleee ## runs kuttl tests for the openstack-ansibleee operator. Installs openstack-ansibleee operator and cleans up previous deployments before running the tests, add cleanup after running the tests.
2018
-
$(eval$(call vars,$@,openstack-ansibleee))
2019
-
make wait
2020
-
make ansibleee_kuttl_run
2021
-
make ansibleee_cleanup
2022
-
bash scripts/restore-namespace.sh
2023
-
2024
1985
.PHONY: glance_kuttl_run
2025
1986
glance_kuttl_run: ## runs kuttl tests for the glance operator, assumes that everything needed for running the test was deployed beforehand.
2026
1987
GLANCE_KUTTL_DIR=${GLANCE_KUTTL_DIR} kubectl-kuttl test --config ${GLANCE_KUTTL_CONF}${GLANCE_KUTTL_DIR} --namespace ${NAMESPACE}$(KUTTL_ARGS)
openstack_kuttl_prep: input deploy_cleanup openstack openstack_deploy_prep ## runs kuttl tests for the openstack operator. Installs openstack operator and cleans up previous deployments before running the tests, cleans up after running the tests.
2052
+
# Wait until OLM installs openstack CRDs
2053
+
timeout $(TIMEOUT) bash -c "while ! (oc get crd openstacks.operator.openstack.org); do sleep 1; done"
2054
+
make openstack_init
2055
+
$(eval$(call vars,$@,infra))
2056
+
make wait
2057
+
$(eval$(call vars,$@,openstack-baremetal))
2058
+
make wait
2059
+
$(eval$(call vars,$@,openstack))
2060
+
make wait
2061
+
2088
2062
.PHONY: openstack_kuttl_run
2089
2063
openstack_kuttl_run: ## runs kuttl tests for the openstack operator, assumes that everything needed for running the test was deployed beforehand.
2090
2064
set -e;\
@@ -2095,23 +2069,17 @@ openstack_kuttl_run: ## runs kuttl tests for the openstack operator, assumes tha
2095
2069
kubectl-kuttl test --config ${OPENSTACK_KUTTL_CONF}${OPENSTACK_KUTTL_DIR} --test $${test_dir};\
openstack_kuttl: input deploy_cleanup openstack openstack_deploy_prep ## runs kuttl tests for the openstack operator. Installs openstack operator and cleans up previous deployments before running the tests, cleans up after running the tests.
2101
-
# Wait until OLM installs openstack CRDs
2102
-
timeout $(TIMEOUT) bash -c "while ! (oc get crd openstacks.operator.openstack.org); do sleep 1; done"
2103
-
make openstack_init
2104
-
$(eval$(call vars,$@,ansibleee))
2105
-
make wait
2106
-
$(eval$(call vars,$@,infra))
2107
-
make wait
2108
-
$(eval$(call vars,$@,openstack-baremetal))
2109
-
make wait
2110
-
$(eval$(call vars,$@,openstack))
2111
-
make wait
2080
+
openstack_kuttl: openstack_kuttl_prep
2112
2081
make openstack_kuttl_run
2113
-
make openstack_deploy_cleanup
2114
-
make openstack_cleanup
2082
+
make openstack_kuttl_cleanup
2115
2083
2116
2084
##@ CHAINSAW tests
2117
2085
@@ -2217,24 +2185,6 @@ heat_deploy_cleanup: ## cleans up the service instance, Does not affect the oper
0 commit comments