diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/deploy-bifrost.sh | 23 | ||||
| -rw-r--r-- | tests/run.yml | 32 | ||||
| -rwxr-xr-x | tests/test-bifrost.sh | 31 | ||||
| -rwxr-xr-x | tests/upgrade-bifrost.sh | 24 |
4 files changed, 9 insertions, 101 deletions
diff --git a/tests/deploy-bifrost.sh b/tests/deploy-bifrost.sh deleted file mode 100755 index b06a6d769..000000000 --- a/tests/deploy-bifrost.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -o xtrace -set -o errexit - -# Enable unbuffered output for Ansible in Jenkins. -export PYTHONUNBUFFERED=1 - - -function deploy_bifrost { - RAW_INVENTORY=/etc/kolla/inventory - - source $KOLLA_ANSIBLE_VENV_PATH/bin/activate - - # TODO(mgoddard): run prechecks. - # Deploy the bifrost container. - # TODO(mgoddard): add pull action when we have a local registry service in - # CI. - kolla-ansible deploy-bifrost -i ${RAW_INVENTORY} -vvv &> /tmp/logs/ansible/deploy-bifrost -} - - -deploy_bifrost diff --git a/tests/run.yml b/tests/run.yml index cf34cde86..c0021de33 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -781,31 +781,17 @@ when: is_upgrade # Bifrost testing. - - block: - - name: Run deploy-bifrost.sh script - shell: - cmd: tests/deploy-bifrost.sh - executable: /bin/bash - chdir: "{{ kolla_ansible_src_dir }}" - environment: - KOLLA_ANSIBLE_VENV_PATH: "{{ kolla_ansible_venv_path }}" + - name: Bifrost testing + when: scenario == "bifrost" + block: + - import_role: + name: kolla-ansible-deploy-bifrost - - name: Run test-bifrost.sh script - shell: - cmd: tests/test-bifrost.sh - executable: /bin/bash - chdir: "{{ kolla_ansible_src_dir }}" - environment: - CONTAINER_ENGINE: "{{ container_engine }}" + - import_role: + name: kolla-ansible-test-bifrost - - name: Run upgrade-bifrost.sh script - shell: - cmd: tests/upgrade-bifrost.sh - executable: /bin/bash - chdir: "{{ kolla_ansible_src_dir }}" - environment: - KOLLA_ANSIBLE_VENV_PATH: "{{ kolla_ansible_venv_path }}" - when: scenario == "bifrost" + - import_role: + name: kolla-ansible-upgrade-bifrost # NOTE(yoctozepto): each host checks itself - hosts: all diff --git a/tests/test-bifrost.sh b/tests/test-bifrost.sh deleted file mode 100755 index b8017c026..000000000 --- a/tests/test-bifrost.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -o xtrace -set -o errexit - -# Enable unbuffered output for Ansible in Jenkins. -export PYTHONUNBUFFERED=1 - - -function test_bifrost { - container_engine="${1:-docker}" - - # TODO(mgoddard): More testing, deploy bare metal nodes. - # TODO(mgoddard): Use openstackclient when clouds.yaml works. See - # https://bugs.launchpad.net/bifrost/+bug/1754070. - attempts=0 - while [[ $(sudo ${container_engine} exec bifrost_deploy bash -c "OS_CLOUD=bifrost baremetal driver list -f value" | wc -l) -eq 0 ]]; do - attempts=$((attempts + 1)) - if [[ $attempts -gt 6 ]]; then - echo "Timed out waiting for ironic conductor to become active" - exit 1 - fi - sleep 10 - done - sudo $container_engine exec bifrost_deploy bash -c "OS_CLOUD=bifrost baremetal node list" - sudo $container_engine exec bifrost_deploy bash -c "OS_CLOUD=bifrost baremetal node create --driver redfish --name test-node" - sudo $container_engine exec bifrost_deploy bash -c "OS_CLOUD=bifrost baremetal node delete test-node" -} - - -test_bifrost $1 diff --git a/tests/upgrade-bifrost.sh b/tests/upgrade-bifrost.sh deleted file mode 100755 index a5d5c3682..000000000 --- a/tests/upgrade-bifrost.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -o xtrace -set -o errexit - -# Enable unbuffered output for Ansible in Jenkins. -export PYTHONUNBUFFERED=1 - - -function upgrade_bifrost { - RAW_INVENTORY=/etc/kolla/inventory - - source $KOLLA_ANSIBLE_VENV_PATH/bin/activate - - # TODO(mgoddard): run prechecks. - # TODO(mgoddard): add pull action when we have a local registry service in - # CI. - # TODO(mgoddard): make some configuration file changes and trigger a real - # upgrade. - kolla-ansible deploy-bifrost -i ${RAW_INVENTORY} -vvv &> /tmp/logs/ansible/upgrade-bifrost -} - - -upgrade_bifrost |
