aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-09-22 20:37:01 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-09-22 20:42:53 +0200
commite1328a170e677d922c18d68154511699c33c1478 (patch)
tree9f4b35f6a87375837f6d2023d5ffba41d4c54e33
parent9a07ca5f3ddb729f70c9dc001262f6b5e011a6b4 (diff)
Swith to coreutils timeout
juju is not correctly stopped when no internet. Change-Id: Id06c6e829ab8a992107f655aac6ec4539e292d82 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit cda22d7db0bcca380e1caef76e171cd7753b6221)
-rw-r--r--docker/core/Dockerfile2
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 26ffdccf7..e5600bd46 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -5,7 +5,7 @@ ARG OPENSTACK_TAG=stable/rocky
RUN apk --no-cache add --update \
python libffi openssl libjpeg-turbo py-pip bash \
- grep sed wget ca-certificates git openssh-client qemu-img iputils && \
+ grep sed wget ca-certificates git openssh-client qemu-img iputils coreutils && \
apk --no-cache add --virtual .build-deps --update \
python-dev build-base linux-headers libffi-dev \
openssl-dev libjpeg-turbo-dev && \
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index 7c8a925bb..23494dce6 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -238,7 +238,7 @@ class JujuEpc(singlevm.VmReady2):
self.flavor_alt = self.create_flavor_alt()
self.__logger.info("Starting Juju Bootstrap process...")
try:
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ cmd = ['timeout', JujuEpc.juju_timeout,
'juju', 'bootstrap',
'abot-epc/{}'.format(
self.cloud.region_name if self.cloud.region_name else (
@@ -296,7 +296,7 @@ class JujuEpc(singlevm.VmReady2):
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
self.__logger.info("Waiting for instances .....")
try:
- cmd = ['timeout', '-t', JujuEpc.juju_timeout, 'juju-wait']
+ cmd = ['timeout', JujuEpc.juju_timeout, 'juju-wait']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
self.__logger.info("Deployed Abot-epc on Openstack")
@@ -318,14 +318,14 @@ class JujuEpc(singlevm.VmReady2):
return False
self.__logger.info("Transferring the feature files to Abot_node ...")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ cmd = ['timeout', JujuEpc.juju_timeout,
'juju', 'scp', '--', '-r', '-v',
'{}/featureFiles'.format(self.case_dir), 'abot-epc-basic/0:~/']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
self.__logger.info("Copying the feature files within Abot_node ")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ cmd = ['timeout', JujuEpc.juju_timeout,
'juju', 'ssh', 'abot-epc-basic/0',
'sudo', 'cp', '-vfR', '~/featureFiles/*',
'/etc/rebaca-test-suite/featureFiles']
@@ -342,13 +342,13 @@ class JujuEpc(singlevm.VmReady2):
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
- cmd = ['timeout', '-t', JujuEpc.juju_timeout, 'juju-wait']
+ cmd = ['timeout', JujuEpc.juju_timeout, 'juju-wait']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
duration = time.time() - start_time
self.__logger.info("Getting results from Abot node....")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ cmd = ['timeout', JujuEpc.juju_timeout,
'juju', 'scp', '--', '-v',
'abot-epc-basic/0:'
'/var/lib/abot-epc-basic/artifacts/TestResults.json',
@@ -396,7 +396,7 @@ class JujuEpc(singlevm.VmReady2):
self.__logger.debug(
"%s\n%s", " ".join(cmd), output.decode("utf-8"))
self.__logger.info("Destroying Orchestrator...")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ cmd = ['timeout', JujuEpc.juju_timeout,
'juju', 'destroy-controller', '-y', 'abot-controller',
'--destroy-all-models']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)