diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2020-08-11 12:21:02 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2020-09-23 06:38:07 +0000 |
commit | c0705164a2bbb730b3f09106811bd0fe0806fc63 (patch) | |
tree | 573f3bd89e51cfb9a85a8ba7f5c02424d599e7b6 /deployment/noheat/infra-openstack/vagrant/test/create_host.test | |
parent | fad907c88a3cbaf9f79d661561625c36d504c0a4 (diff) |
Set up and tear down test environment properly
Two issues were detected during testing deployment locally:
- incomplete provisioning if set up from scratch [1],
- leaving DevStack in unknown state if test failed.
[1] https://www.vagrantup.com/docs/cli/up#provision-with-x-y-z
Issue-ID: INT-1601
Change-Id: Ie553ba71a2b56789736ab822f1f1a2e4043f4935
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'deployment/noheat/infra-openstack/vagrant/test/create_host.test')
-rwxr-xr-x | deployment/noheat/infra-openstack/vagrant/test/create_host.test | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/deployment/noheat/infra-openstack/vagrant/test/create_host.test b/deployment/noheat/infra-openstack/vagrant/test/create_host.test index d36e288e9..f2a1ab909 100755 --- a/deployment/noheat/infra-openstack/vagrant/test/create_host.test +++ b/deployment/noheat/infra-openstack/vagrant/test/create_host.test @@ -5,8 +5,13 @@ export HOST_NAME='operator0' export VAGRANT_CWD='..' set_up() { - vagrant up --provision-with=run_playbook_destroy - vagrant up --provision-with=run_playbook_create + vagrant up + vagrant provision --provision-with=run_playbook_destroy + vagrant provision --provision-with=run_playbook_create +} + +tear_down() { + vagrant provision --provision-with=run_playbook_destroy } check() { @@ -19,3 +24,4 @@ check() { set_up >/dev/null # drop provisioning output check "$HOST_NAME" +tear_down >/dev/null # drop provisioning output |