From 11e2fdd2fb8a0b6489f9be91267e3c71dd2ed6ed Mon Sep 17 00:00:00 2001 From: Graham Hayes Date: Mon, 15 Oct 2018 17:31:43 +0100 Subject: [PATCH] Add functional testing for Designate Change-Id: If9fe00c437e6ca1341c72c1081eee35ad2ee46d2 Signed-off-by: Graham Hayes --- .zuul.yaml | 2 ++ playbooks/ospurge-functional/run.yaml | 5 +++++ test-requirements.txt | 1 + tools/func-tests.sh | 5 +++++ tools/populate.sh | 9 +++++++++ 5 files changed, 22 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 182d6b9..9bb0768 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -7,6 +7,8 @@ required-projects: - openstack-infra/devstack-gate - openstack/ospurge + - openstack/designate + - openstack/python-designateclient irrelevant-files: &dsvm-irrelevant-files - ^(test-|)requirements.txt$ - ^.*\.rst$ diff --git a/playbooks/ospurge-functional/run.yaml b/playbooks/ospurge-functional/run.yaml index 57410ba..10f6cd9 100644 --- a/playbooks/ospurge-functional/run.yaml +++ b/playbooks/ospurge-functional/run.yaml @@ -30,6 +30,11 @@ export DEVSTACK_GATE_TEMPEST=0 export DEVSTACK_GATE_NEUTRON=1 export BRANCH_OVERRIDE=default + + export DEVSTACK_LOCAL_CONFIG="enable_plugin designate git://git.openstack.org/openstack/designate" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"DESIGNATE_SERVICE_PORT_DNS=5322" + export PROJECTS="openstack/designate $PROJECTS" + export PROJECTS="openstack/ospurge $PROJECTS" if [ "$BRANCH_OVERRIDE" != "default" ] ; then export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE diff --git a/test-requirements.txt b/test-requirements.txt index c6cc08b..77b09b1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,7 @@ openstackdocstheme>=1.5.0 # Apache-2.0 sphinx>=1.6.2 # BSD testrepository>=0.0.18 # Apache-2.0/BSD python-openstackclient>=3.16.1 +python-designateclient # Python 2.7 dependencies mock; python_version < '3.0' diff --git a/tools/func-tests.sh b/tools/func-tests.sh index f002d8b..cd9480b 100755 --- a/tools/func-tests.sh +++ b/tools/func-tests.sh @@ -167,3 +167,8 @@ else exit 1 fi fi + +if [[ $(openstack zone list --all-projects | wc -l) -ne 1 ]]; then # This also checks FIP + echo "Not all zones were cleaned up" + exit 1 +fi \ No newline at end of file diff --git a/tools/populate.sh b/tools/populate.sh index 252cf4b..02781fb 100755 --- a/tools/populate.sh +++ b/tools/populate.sh @@ -68,6 +68,8 @@ EXTNET_NAME=${EXTNET_NAME:-public} FLAVOR=${FLAVOR:-m1.nano} # Image used for the VM VMIMG_NAME=${VMIMG_NAME:-cirros-0.3.5-x86_64-disk} +# Zone name used for the Designate Zone +ZONE_NAME="${UUID//-/}.com." @@ -181,6 +183,13 @@ exit_on_failure "Unable to create Glance iamge ${UUID}" swift upload ${UUID} ${UUID}.raw || true +############################### +### Designate +############################### +# Create Designate Zone +openstack zone create --email hostmaster@example.com ${ZONE_NAME} +exit_on_failure "Unable to create Designate Zone ${ZONE_NAME}" + ############################### ### Link resources