Adding BDD prefixes for different environments 41/32041/2
authorilanap <ilanap@amdocs.com>
Sun, 18 Feb 2018 09:02:03 +0000 (11:02 +0200)
committerAvi Gaffa <avi.gaffa@amdocs.com>
Sun, 18 Feb 2018 13:15:44 +0000 (13:15 +0000)
Change-Id: I393f7e68b209b2a29134073453ee5ec92339330b
Issue-ID: SDC-990
Signed-off-by: ilanap <ilanap@amdocs.com>
openecomp-bdd/.gitignore
openecomp-bdd/config.json
openecomp-bdd/resources/downloads/VSPPackage.zip [deleted file]
openecomp-bdd/resources/downloads/base_mux.zip [deleted file]
openecomp-bdd/stepDefinitions/Utils.js
openecomp-bdd/stepDefinitions/VF_steps.js
openecomp-bdd/stepDefinitions/world.js

index d2fe79b..24d45c4 100644 (file)
@@ -6,4 +6,5 @@ dist
 docs
 node_modules
 .npmrc
-npm-debug.log
\ No newline at end of file
+npm-debug.log
+config.json
\ No newline at end of file
index 0a3ab03..6038f18 100644 (file)
@@ -3,6 +3,11 @@
   "server": "SET_TO_YOUR_SERVER_IP",
 
   "port": 8285,
-  "prefix":"sdc1/feProxy/onboarding-api/v1.0",
-  "vf_prefix":"sdc1/feProxy/rest/v1"
+
+  "prefix" : {
+    "onboarding":"sdc1/feProxy/onboarding-api/v1.0",
+    "vf":"sdc1/feProxy/rest/v1",
+    "activity_spec":"sdc1/feProxy/activityspec-api/v1"
+
+  }
 }
\ No newline at end of file
diff --git a/openecomp-bdd/resources/downloads/VSPPackage.zip b/openecomp-bdd/resources/downloads/VSPPackage.zip
deleted file mode 100644 (file)
index 633cb73..0000000
Binary files a/openecomp-bdd/resources/downloads/VSPPackage.zip and /dev/null differ
diff --git a/openecomp-bdd/resources/downloads/base_mux.zip b/openecomp-bdd/resources/downloads/base_mux.zip
deleted file mode 100644 (file)
index 1cc7ea4..0000000
Binary files a/openecomp-bdd/resources/downloads/base_mux.zip and /dev/null differ
index ff49727..08d0a2b 100644 (file)
@@ -17,8 +17,9 @@ const request = require('request');
 const fs = require('fs');
 require('node-zip');
 
-function _request(context, method, path, data, isBinary=false, isVFCall=false) {
-       let server = (isVFCall) ? context.vf_server : context.onboarding_server;
+function _request(context, method, path, data, isBinary=false, prefix='onboarding') {
+       let server = context.server + '/' + context.prefix[prefix];
+
        let options = {
                method: method,
                url: server + path,
index d00cf9c..268c371 100644 (file)
@@ -37,7 +37,7 @@ Then('I want to create a VF for this Item', function () {
                this.context.inputData.tags[0] = result.data.name;
                this.context.inputData.vendorName = result.data.vendorName;
                this.context.inputData.csarUUID = this.context.item.id;
-               return util.request(this.context, 'POST', '/catalog/resources', this.context.inputData, false, true);
+               return util.request(this.context, 'POST', '/catalog/resources', this.context.inputData, false, 'vf');
        });
 });
 
index e87a9b5..ba6d57a 100644 (file)
@@ -40,8 +40,7 @@ class CustomWorld {
                } else {
                        this.context.server = config.server;
                }
-               this.context.onboarding_server = (config.protocol + '://' + this.context.server + ':' + config.port + '/' + config.prefix);
-               this.context.vf_server = (config.protocol + '://' + this.context.server + ':' + config.port + '/' + config.vf_prefix);
+               this.context.server = (config.protocol + '://' + this.context.server + ':' + config.port);
 
 
                this.context.headers = {};
@@ -56,9 +55,10 @@ class CustomWorld {
                this.context.inputData = null;
                this.context.responseData = null;
 
+               this.context.prefix = config.prefix;
+
                this.setServer = function(server) {
-                       this.context.onboarding_server = (config.protocol + '://' +server + ':' + config.port + '/' + config.prefix);
-                       this.context.vf_server = (config.protocol + '://' +server + ':' + config.port + '/' + config.vf_prefix);
+                       this.context.server = (config.protocol + '://' + this.context.server + ':' + config.port);
                }
 
                setDefaultTimeout(60 * 1000);