Skip to content

Commit

Permalink
Fix osb-checker job issues (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
liusheng authored and kiwik committed Sep 5, 2018
1 parent aea30c8 commit 83a53fb
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"authentication": "basic",
"provisions": [
{
"instance_id": "",
"instance_id": "dcs-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "d54d393b-f5ce-4eb7-86be-49da00606368",
"service_id": "45d162e1-cf1e-455c-beff-cc0765d9a377",
Expand All @@ -26,7 +26,7 @@
],
"updates": [
{
"instance_id": "",
"instance_id": "dcs-instance-id-{{ name_uuid }}",
"body": {
"service_id": "45d162e1-cf1e-455c-beff-cc0765d9a377",
"plan_id": "d54d393b-f5ce-4eb7-86be-49da00606368",
Expand All @@ -49,6 +49,8 @@
],
"bindings": [
{
"instance_id": "dcs-instance-id-{{ name_uuid }}",
"binding_id": "dcs-binding-id-{{ name_uuid }}",
"body": {
"service_id": "45d162e1-cf1e-455c-beff-cc0765d9a377",
"plan_id": "d54d393b-f5ce-4eb7-86be-49da00606368"
Expand All @@ -57,6 +59,8 @@
"scenario": "new"
},
{
"instance_id": "dcs-instance-id-{{ name_uuid }}",
"binding_id": "dcs-binding-id-{{ name_uuid }}",
"body": {
"service_id": "45d162e1-cf1e-455c-beff-cc0765d9a377",
"plan_id": "d54d393b-f5ce-4eb7-86be-49da00606368"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"authentication": "basic",
"provisions": [
{
"instance_id": "",
"instance_id": "dms-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "d0c150cb-6a2a-47aa-8937-9c55d4615e14",
"service_id": "fc0c6ad1-ff5a-499a-8598-fda9fb414fcb",
"parameters": {
"username": "username",
"password": "Password1234!",
"name": "RabbitMQSingleNode",
"name": "osb-checker-dms-{{ name_uuid }}",
"description": "RabbitMQ Single Node Test"
},
"organization_guid": "organization_id",
Expand All @@ -26,12 +26,12 @@
],
"updates": [
{
"instance_id": "",
"instance_id": "dms-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "d0c150cb-6a2a-47aa-8937-9c55d4615e14",
"service_id": "fc0c6ad1-ff5a-499a-8598-fda9fb414fcb",
"parameters": {
"name": "RabbitMQSingleNode1",
"name": "osb-checker-obs-updated-{{ name_uuid }}",
"description": "RabbitMQ Single Node Test1"
},
"previous_values": {
Expand All @@ -47,6 +47,8 @@
],
"bindings": [
{
"instance_id": "dms-instance-id-{{ name_uuid }}",
"binding_id": "dms-binding-id-{{ name_uuid }}",
"body": {
"plan_id": "d0c150cb-6a2a-47aa-8937-9c55d4615e14",
"service_id": "fc0c6ad1-ff5a-499a-8598-fda9fb414fcb"
Expand All @@ -55,6 +57,8 @@
"scenario": "new"
},
{
"instance_id": "dms-instance-id-{{ name_uuid }}",
"binding_id": "dms-binding-id-{{ name_uuid }}",
"body": {
"plan_id": "d0c150cb-6a2a-47aa-8937-9c55d4615e14",
"service_id": "fc0c6ad1-ff5a-499a-8598-fda9fb414fcb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"authentication": "basic",
"provisions": [
{
"instance_id": "",
"instance_id": "obs-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "df0312bf-8189-4482-826e-2370a7f4d805",
"service_id": "94e8ffdf-bf9c-422f-b73c-776a3ca69f35",
Expand All @@ -24,7 +24,7 @@
],
"updates": [
{
"instance_id": "",
"instance_id": "obs-instance-id-{{ name_uuid }}",
"body": {
"service_id": "94e8ffdf-bf9c-422f-b73c-776a3ca69f35",
"plan_id": "df0312bf-8189-4482-826e-2370a7f4d805",
Expand All @@ -45,6 +45,8 @@
],
"bindings": [
{
"instance_id": "obs-instance-id-{{ name_uuid }}",
"binding_id": "obs-binding-id-{{ name_uuid }}",
"body": {
"service_id": "94e8ffdf-bf9c-422f-b73c-776a3ca69f35",
"plan_id": "df0312bf-8189-4482-826e-2370a7f4d805"
Expand All @@ -53,6 +55,8 @@
"scenario": "new"
},
{
"instance_id": "obs-instance-id-{{ name_uuid }}",
"binding_id": "obs-binding-id-{{ name_uuid }}",
"body": {
"service_id": "94e8ffdf-bf9c-422f-b73c-776a3ca69f35",
"plan_id": "df0312bf-8189-4482-826e-2370a7f4d805"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"authentication": "basic",
"provisions": [
{
"instance_id": "",
"instance_id": "rds-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "839f4458-309a-4e05-a069-807e950cf6da",
"service_id": "275f3e0b-86fd-4303-946c-171374d29150",
Expand All @@ -24,7 +24,7 @@
],
"updates": [
{
"instance_id": "",
"instance_id": "rds-instance-id-{{ name_uuid }}",
"body": {
"plan_id": "839f4458-309a-4e05-a069-807e950cf6da",
"service_id": "275f3e0b-86fd-4303-946c-171374d29150",
Expand All @@ -44,6 +44,8 @@
],
"bindings": [
{
"instance_id": "rds-instance-id-{{ name_uuid }}",
"binding_id": "rds-binding-id-{{ name_uuid }}",
"body": {
"plan_id": "839f4458-309a-4e05-a069-807e950cf6da",
"service_id": "275f3e0b-86fd-4303-946c-171374d29150"
Expand All @@ -52,6 +54,8 @@
"scenario": "new"
},
{
"instance_id": "rds-instance-id-{{ name_uuid }}",
"binding_id": "rds-binding-id-{{ name_uuid }}",
"body": {
"plan_id": "839f4458-309a-4e05-a069-807e950cf6da",
"service_id": "275f3e0b-86fd-4303-946c-171374d29150"
Expand Down
4 changes: 3 additions & 1 deletion playbooks/osb-checker-test-huaweicloud/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,16 @@
# openservicebrokerapi/osb-checker is required project. Run tests
pushd $GOPATH/src/github.com/openservicebrokerapi/osb-checker/2.13/tests/
npm install
npm install --save-dev mocha-simple-html-reporter
npm install --global mocha
set +x
checker_cfg=config_mock.json
mkdir -p "{{ ansible_user_dir }}/workspace/test_results/"
for service in obs dcs rds dms; do
echo "#########################################################################"
echo "Runing osb-checker against huaweicloud ${service} service...."
sed -i "s/${checker_cfg}/config_huaweicloud_${service}.json/g" test/test.js
mocha -t 200000 test/test.js || exitcode=$?
mocha -t 200000 test/test.js --reporter mocha-simple-html-reporter --reporter-options output="{{ ansible_user_dir }}/workspace/test_results/${service}.html" || exitcode=$?
checker_cfg=config_huaweicloud_${service}.json
done
popd
Expand Down
13 changes: 13 additions & 0 deletions roles/copy-files-on-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@
- --exclude=*
- --prune-empty-dirs
- --min-size=1

- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/test_results/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

0 comments on commit 83a53fb

Please sign in to comment.