Skip to content

Commit 47d79e5

Browse files
committed
Merge pull request #76 from jonasbjurel/functest
Fix for func-test
2 parents 5e966b0 + 1a0d70f commit 47d79e5

File tree

3 files changed

+142
-51
lines changed

3 files changed

+142
-51
lines changed

ci_fuel_opnfv/ci_pipeline.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -624,33 +624,39 @@ function func_test {
624624

625625
# start functest docker container and bind mount the docker's /home/opnfv/result
626626
# to the artifact test_result directory
627-
FUNCTEST_CID=`docker run -dt -v ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result:/home/opnfv/result -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=${FUEL_IP}" opnfv/functest`
627+
FUNCTEST_CID=`docker run -dt -v ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result:/home/opnfv/result -v ${FUNCTEST_CONFIG}:/home/opnfv/functest/conf/config_functest.yaml -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=${FUEL_IP}" ${DOCKER_FUNCTEST_IMG}`
628628

629629
# Redirect stdout to the log-file
630630
tail -n 0 -f ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/ci.log > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log &
631631
sleep 0.3
632632
FUNC_TEST_LOGPID=$!
633633

634+
[ $DEBUG_DO_NOTHING -ne 1 ] && docker exec -t ${FUNCTEST_CID} /home/opnfv/repos/functest/docker/prepare_env.sh
635+
634636
echo
635637
echo "========== Running func tests =========="
636638
RESULT="ERROR OPNV Functional test failed"
637639
STATUS="FUNCTEST"
638640
put_status
639641

640642
# Start functest script inside the docker container
641-
[ $DEBUG_DO_NOTHING -ne 1 ] && docker exec -t ${FUNCTEST_CID} /home/opnfv/repos/functest/docker/start.sh
643+
[ $DEBUG_DO_NOTHING -ne 1 ] && docker exec -t ${FUNCTEST_CID} /home/opnfv/repos/functest/docker/run_tests.sh
642644

643645
# Stop logging
644646
kill ${FUNC_TEST_LOGPID}
645647

646-
# Copying and formatting test results to the artifact's test_reult directory
647-
docker exec -t ${FUNCTEST_CID} cp -f /home/opnfv/repos/rally/log.html /home/opnfv/result/rally/log.html
648-
docker exec -t ${FUNCTEST_CID} cp -f /home/opnfv/repos/rally/report.html /home/opnfv/result/rally/report.html
648+
# Formatting test results to the artifact's test_reult directory
649+
# vPing
650+
sed -n "/---------- Running vPING test case ----------/","/----------- Running ODL test case -----------/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/vping/test_results.log
651+
652+
# ODL
653+
sed -n "/----------- Running ODL test case -----------/","/--------- Running Rally bench suite ---------/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/odl/test_results.log
649654

650-
sed -n "/Functest: run vPing/","/Functest: run ODL suite/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/vping/test_results.log
651-
sed -n "/Functest: run ODL suite/","/Functest: run Functest Rally Bench suites/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/odl/test_results.log
652-
sed -n "/Functest: run Tempest suite/","/Functest: copy results and clean Functest environment/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/tempest/test_results.log
653-
sed -n "/Functest: run Functest Rally Bench suites/","/Functest: run Tempest suite/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/rally/test_results.log
655+
# Tempest
656+
sed -n "/-------- Running Tempest smoke tests --------/","/Functest: copy results and clean Functest environment/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/tempest/test_results.log
657+
658+
# Rally
659+
sed -n "/--------- Running Rally bench suite ---------/","/-------- Running Tempest smoke tests --------/p" ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/test_results.log | head -n -1 > ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/rally/test_results.log
654660

655661
sudo chown -fR ${USER} ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result
656662
sudo chgrp -fR ${GROUP} ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result
@@ -747,8 +753,8 @@ if [ -n "${DEPLOYTGT}" ]; then
747753
else
748754
DEPLOY_CONFIG="default_no_ha"
749755
fi
750-
751-
DOCKER_FUNCTEST_IMG="opnfv/functest"
756+
FUNCTEST_CONFIG=${SCRIPT_PATH}/config/functest/config_functest.yaml
757+
DOCKER_FUNCTEST_IMG="opnfv/functest:r2_20_22_15"
752758
STATUS_FILE_PATH="/var/run/fuel"
753759
STATUS_FILE="${STATUS_FILE_PATH}/ci-status"
754760
PID_LOCK_FILE="${STATUS_FILE_PATH}/PID"
@@ -1055,7 +1061,7 @@ fi
10551061

10561062
if [ $TEST -eq 1 ]; then
10571063
echo "================================================================="
1058-
echo "test results are at: ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test-result/"
1064+
echo "test results are at: ${BUILD_ARTIFACT_STORE}/${BRANCH}/${VERSION}/test_result/"
10591065
echo "================================================================="
10601066
echo
10611067
fi

ci_fuel_opnfv/config/config_functest.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
general:
2+
directories:
3+
# Relative to the path where the repo is cloned:
4+
dir_vping: testcases/vPing/CI/libraries/
5+
dir_odl: testcases/Controllers/ODL/CI/
6+
dir_rally: testcases/VIM/OpenStack/CI/libraries/
7+
dir_rally_scn: testcases/VIM/OpenStack/CI/suites/
8+
dir_vIMS: testcases/vIMS/CI/
9+
dir_onos: testcases/Controllers/ONOS/Teston/CI/
10+
11+
# Absolute path
12+
dir_repos: /home/opnfv/repos
13+
dir_repo_functest: /home/opnfv/repos/functest
14+
dir_repo_rally: /home/opnfv/repos/rally
15+
dir_repo_releng: /home/opnfv/repos/releng
16+
dir_functest: /home/opnfv/functest
17+
dir_results: /home/opnfv/functest/results
18+
dir_functest_conf: /home/opnfv/functest/conf
19+
dir_rally_res: /home/opnfv/functest/results/rally
20+
dir_functest_data: /home/opnfv/functest/data
21+
dir_vIMS_data: /home/opnfv/functest/data/vIMS
22+
dir_rally_inst: ~/.rally
23+
24+
repositories:
25+
# branch and commit ID to which the repos will be reset (HEAD)
26+
functest_branch: master
27+
functest_commit: b3e241e1ee0e794ec732eddc5eaeb1f59dc1a999
28+
releng_branch: master
29+
releng_commit: 976b5ae48a545c72c87f9e5dba9deee7e94ada94
30+
rally_branch: master
31+
rally_commit: 9a17d8490e7fb4afee2f5629e6db41eabe4bc4d4
32+
33+
openstack:
34+
image_name: functest-img
35+
image_url: http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
36+
image_disk_format: qcow2
37+
38+
39+
#Public network. Optional
40+
neutron_public_net_name: net04_ext
41+
neutron_public_subnet_name: net04_ext__subnet
42+
neutron_public_subnet_cidr: 172.16.9.0/24
43+
neutron_public_subnet_start: 172.16.9.130
44+
neutron_public_subnet_end: 172.16.9.254
45+
#Private network for functest. Will be created by config_functest.py
46+
neutron_private_net_name: functest-net
47+
neutron_private_subnet_name: functest-subnet
48+
neutron_private_subnet_cidr: 192.168.120.0/24
49+
neutron_private_subnet_start: 192.168.120.2
50+
neutron_private_subnet_end: 192.168.120.254
51+
neutron_private_subnet_gateway: 192.168.120.254
52+
neutron_router_name: functest-router
53+
vping:
54+
ping_timeout: 200
55+
vm_flavor: m1.small #adapt to your environment
56+
vm_name_1: opnfv-vping-1
57+
vm_name_2: opnfv-vping-2
58+
ip_1: 192.168.120.30
59+
ip_2: 192.168.120.40
60+
61+
vIMS:
62+
general:
63+
tenant_name: vIMS
64+
tenant_description: vIMS Functionality Testing
65+
base_image_url: http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
66+
base_image_name: ubuntu_14.04
67+
cloudify:
68+
blueprint:
69+
url: https://github.com/boucherv-orange/cloudify-manager-blueprints.git
70+
branch: "3.2-build"
71+
file_name: "openstack-manager-blueprint.yaml"
72+
inputs:
73+
keystone_username: ""
74+
keystone_password: ""
75+
keystone_tenant_name: ""
76+
keystone_url: ""
77+
manager_public_key_name: 'cloudify-manager'
78+
agent_public_key_name: 'cloudify-agent'
79+
image_id: ""
80+
flavor_id: "2"
81+
external_network_name: ""
82+
use_existing_manager_keypair: false
83+
use_existing_agent_keypair: false
84+
manager_server_name: cloudify-management-server
85+
manager_server_user: ubuntu
86+
manager_security_group_name: cloudify-sg-manager
87+
agents_security_group_name: cloudify-sg-agents
88+
manager_private_key_path: ~/.ssh/cloudify-manager-kp.pem
89+
agent_private_key_path: ~/.ssh/cloudify-agent-kp.pem
90+
agents_user: ubuntu
91+
nova_url: ""
92+
neutron_url: ""
93+
resources_prefix: ""
94+
inputs_path: openstack/inputs.yaml
95+
clearwater:
96+
blueprint:
97+
file_name: 'openstack-blueprint.yaml'
98+
name: "clearwater-opnfv"
99+
destination_folder: "opnfv-cloudify-clearwater"
100+
url: 'https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater.git'
101+
branch: "master"
102+
deployment-name: 'clearwater-opnfv'
103+
inputs:
104+
image_id: ''
105+
flavor_id: ''
106+
agent_user: 'ubuntu'
107+
external_network_name: ''
108+
public_domain: clearwater.opnfv
109+
ONOS:
110+
general:
111+
onosbench_username: 'root'
112+
onosbench_password: 'root'
113+
onoscli_username: 'root'
114+
onoscli_password: 'root'
115+
runtimeout: 300
116+
environment:
117+
OCT: '189.42.8.99'
118+
OC1: '189.42.8.101'
119+
OC2: '189.42.8.102'
120+
OC3: '189.42.8.103'
121+
OCN: '189.42.8.104'
122+
OCN2: '189.42.8.105'
123+
results:
124+
test_db_url: http://213.77.62.197

0 commit comments

Comments
 (0)