From 061ca938ca6998b4ec33a862c763854259cfeab1 Mon Sep 17 00:00:00 2001 From: ilanap Date: Sun, 4 Aug 2019 10:16:33 +0300 Subject: Issue-ID: SDC-2483 Adding https support for cucumber tests and slight refactoring Signed-off-by: ilanap Change-Id: Ib772d18cd4278238571daf54bcb6372c553d6e4b --- cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js') diff --git a/cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js b/cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js index 731d5b8470..cdb5cbe07d 100644 --- a/cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js +++ b/cucumber-js-test-apis-ci/stepDefinitions/NetworkPackage_steps.js @@ -15,7 +15,7 @@ */ const {Then, When} = require('cucumber'); const assert = require('assert'); -const util = require('./Utils.js'); +const util = require('../cucumber-common/utils/Utils.js'); const _ = require('lodash'); const fs = require('fs'); require('node-zip'); @@ -28,7 +28,7 @@ require('node-zip'); **/ Then('I want to upload a NetworkPackage for this VSP from path {string}', function (string) { let path = '/vendor-software-products/' + this.context.item.id + '/versions/' + this.context.item.versionId + '/orchestration-template-candidate'; - return util.request(this.context, 'POST', path, string, true); + return util.requestBinaryFormData(this.context, 'POST', path, string, 'upload'); }); /** @@ -37,9 +37,9 @@ Then('I want to upload a NetworkPackage for this VSP from path {string}', functi * @exampleFile Example_HEAT.feature * @step I want to download the NetworkPackage for this VSP to path {string} **/ -When('I want to download the NetworkPackage for this VSP to path {string}', function (string, callback) { +When('I want to download the NetworkPackage for this VSP to path {string}', function (string) { let path = '/vendor-software-products/' + this.context.item.id + '/versions/' + this.context.item.versionId + '/orchestration-template-candidate'; - return [util.download(this.context, path, string, callback)]; + return util.download(this.context, path, string); }); /** -- cgit 1.2.3-korg