summaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/features/sfc/sfc.py13
-rwxr-xr-xtestcases/features/sfc/sfc_tacker.bash2
2 files changed, 7 insertions, 8 deletions
diff --git a/testcases/features/sfc/sfc.py b/testcases/features/sfc/sfc.py
index 99aac66b1..562d410b8 100755
--- a/testcases/features/sfc/sfc.py
+++ b/testcases/features/sfc/sfc.py
@@ -18,7 +18,7 @@ parser.add_argument("-r", "--report",
args = parser.parse_args()
""" logging configuration """
-logger = ft_logger.Logger("create_instance_and_ip").getLogger()
+logger = ft_logger.Logger("ODL_SFC").getLogger()
REPO_PATH = os.environ['repos_dir'] + '/functest/'
HOME = os.environ['HOME'] + "/"
@@ -81,7 +81,7 @@ def main():
iptable_command1 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
" " + ip + " iptables -P INPUT ACCEPT ")
iptable_command2 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
- " " + ip + "iptables -t nat -P INPUT ACCEPT ")
+ " " + ip + " iptables -t nat -P INPUT ACCEPT ")
subprocess.call(iptable_command1, shell=True)
subprocess.call(iptable_command2, shell=True)
@@ -269,13 +269,12 @@ def main():
# WRITE THE CORRECT WAY TO DO LOGGING
i = 0
- logger.info("First output: %s" % stdout.readlines())
if "timed out" in stdout.readlines()[0]:
logger.info('\033[92m' + "TEST 1 [PASSED] "
"==> SSH BLOCKED" + '\033[0m')
i = i + 1
else:
- logger.debug('\033[91m' + "TEST 1 [FAILED] "
+ logger.error('\033[91m' + "TEST 1 [FAILED] "
"==> SSH NOT BLOCKED" + '\033[0m')
return
@@ -296,7 +295,7 @@ def main():
"==> HTTP WORKS" + '\033[0m')
i = i + 1
else:
- logger.debug('\033[91m' + "TEST 2 [FAILED] "
+ logger.error('\033[91m' + "TEST 2 [FAILED] "
"==> HTTP BLOCKED" + '\033[0m')
return
@@ -323,7 +322,7 @@ def main():
"==> HTTP BLOCKED" + '\033[0m')
i = i + 1
else:
- logger.debug('\033[91m' + "TEST 3 [FAILED] "
+ logger.error('\033[91m' + "TEST 3 [FAILED] "
"==> HTTP NOT BLOCKED" + '\033[0m')
return
@@ -344,7 +343,7 @@ def main():
"==> SSH WORKS" + '\033[0m')
i = i + 1
else:
- logger.debug('\033[91m' + "TEST 4 [FAILED] "
+ logger.error('\033[91m' + "TEST 4 [FAILED] "
"==> SSH BLOCKED" + '\033[0m')
return
diff --git a/testcases/features/sfc/sfc_tacker.bash b/testcases/features/sfc/sfc_tacker.bash
index 8b53eeb7c..690d5f52e 100755
--- a/testcases/features/sfc/sfc_tacker.bash
+++ b/testcases/features/sfc/sfc_tacker.bash
@@ -1,5 +1,5 @@
#!/bin/bash
-BASEDIR=`pwd`
+BASEDIR=`dirname $0`
#import VNF descriptor
tacker vnfd-create --vnfd-file ${BASEDIR}/test-vnfd1.yaml
/* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright (c) 2017 Intel Corporation. #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- hosts: localhost
  connection: local
  vars:
    vnf_range:
      - 2
      - 4
      - 10


  tasks:
    - include: scale_out_test_templates.yml
      with_items: "{{ vnf_range }}"