@@ -14,9 +14,10 @@ var should = require("chai").should(),
1414
1515const TEST_USERNAME = "wpsadmin" ;
1616const TEST_PASSWORD = "wpsadmin" ;
17- const TEST_HOST = "wpg-portal85-cf06 .rtp.raleigh.ibm.com" ;
17+ const TEST_HOST = "gsagerwcmdesign .rtp.raleigh.ibm.com" ;
1818const TEST_PORT = 10039 ;
1919const TEST_CONTENT_HANDLER = "/wps/mycontenthandler" ;
20+ const TEST_SECURE = false ;
2021
2122const BAD_USERNAME = "justfortesting" ;
2223const BAD_PASSWORD = "alsorgangrpgaasgoijgoah842948aofwehffortesting" ;
@@ -50,7 +51,7 @@ describe("getLibraries-valid-server", function() {
5051 before ( function ( done ) {
5152 this . timeout ( LONG_TIMEOUT ) ;
5253 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
53- TEST_PASSWORD , TESTING_FOLDER ) ;
54+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
5455 wcmHelper . getLibraries ( ) . then ( function ( items ) {
5556 libraries = items ;
5657 done ( ) ;
@@ -83,7 +84,7 @@ describe("getLibraries-invalid-server", function() {
8384 this . timeout ( LONG_TIMEOUT ) ;
8485 var wcmHelper = require ( "../wcmHelper.js" ) ;
8586 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , BAD_USERNAME ,
86- TEST_PASSWORD , TESTING_FOLDER ) ;
87+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
8788 return wcmHelper . getLibraries ( ) . then ( function ( items ) {
8889 assert ( ! items , "NO libraries should be given when the username is invalid" )
8990 console . log ( "DONE, NO ERROR" ) ;
@@ -99,7 +100,7 @@ describe("getLibraries-invalid-server", function() {
99100 this . timeout ( LONG_TIMEOUT ) ;
100101 var wcmHelper = require ( "../wcmHelper.js" ) ;
101102 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
102- BAD_PASSWORD , TESTING_FOLDER ) ;
103+ BAD_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
103104 return wcmHelper . getLibraries ( ) . then ( function ( items ) {
104105 console . log ( "ITEMS!" )
105106 // console.log(items)
@@ -114,7 +115,7 @@ describe("getLibraries-invalid-server", function() {
114115 var wcmHelper = require ( "../wcmHelper.js" ) ;
115116 this . timeout ( LONG_TIMEOUT ) ;
116117 wcmHelper . init ( BAD_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
117- TEST_PASSWORD , TESTING_FOLDER ) ;
118+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
118119 return wcmHelper . getLibraries ( ) . then ( function ( items ) {
119120 assert ( ! items , "NO libraries should be given when the host is invalid" )
120121 should . fail ( "" , "There should be an error if it's invalid" ) ;
@@ -128,7 +129,7 @@ describe("getLibraries-invalid-server", function() {
128129 this . timeout ( LONG_TIMEOUT ) ;
129130 var wcmHelper = require ( "../wcmHelper.js" ) ;
130131 wcmHelper . init ( TEST_HOST , BAD_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
131- TEST_PASSWORD , TESTING_FOLDER ) ;
132+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
132133 return wcmHelper . getLibraries ( ) . then ( function ( items ) {
133134 assert ( ! items , "NO libraries should be given when the port is invalid" )
134135 should . fail ( "" , "There should be an error if it's invalid" ) ;
@@ -142,7 +143,7 @@ describe("getLibraries-invalid-server", function() {
142143 this . timeout ( LONG_TIMEOUT ) ;
143144 var wcmHelper = require ( "../wcmHelper.js" ) ;
144145 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER , TEST_USERNAME ,
145- TEST_PASSWORD , TESTING_FOLDER ) ;
146+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
146147 wcmHelper . getLibraries ( ) . then ( function ( items ) {
147148 assert ( ! items , "NO libraries should be given when the port is invalid" )
148149 should . fail ( "" , "There should be an error if it's invalid" ) ;
@@ -157,7 +158,7 @@ describe("getLibraries-invalid-server", function() {
157158 this . timeout ( LONG_TIMEOUT ) ;
158159 var wcmHelper = require ( "../wcmHelper.js" ) ;
159160 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER_WITH_SUBFOLDER , TEST_USERNAME ,
160- TEST_PASSWORD , TESTING_FOLDER ) ;
161+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
161162 wcmHelper . getLibraries ( ) . then ( function ( items ) {
162163 assert ( ! items , "NO libraries should be given when the content handler is invalid" )
163164 should . fail ( "" , "There should be an error if it's invalid" ) ;
@@ -174,7 +175,7 @@ describe("pullLibrary-valid-server", function() {
174175 it ( "should-succeed-when-server-is-valid" , function ( ) {
175176 this . timeout ( LONG_TIMEOUT ) ;
176177 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
177- TEST_PASSWORD , TESTING_FOLDER ) ;
178+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
178179 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( ) {
179180 // success!
180181 } , function ( err ) {
@@ -187,7 +188,7 @@ describe("pullLibrary-valid-server-parallel", function() {
187188 it ( "should-succeed-when-server-is-valid" , function ( ) {
188189 this . timeout ( LONG_TIMEOUT ) ;
189190 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
190- TEST_PASSWORD , TESTING_FOLDER ) ;
191+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
191192 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false , pullParallel : true } ) . then ( function ( ) {
192193 // success!
193194 } , function ( err ) {
@@ -200,7 +201,7 @@ describe("pullLibrary-invalid-server", function() {
200201 it ( "should-fail-when-given-an-invalid-host" , function ( ) {
201202 this . timeout ( LONG_TIMEOUT ) ;
202203 wcmHelper . init ( BAD_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
203- TEST_PASSWORD , TESTING_FOLDER ) ;
204+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
204205 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( items ) {
205206 fail ( "Expected an error" ) ;
206207 } , function ( err ) {
@@ -212,7 +213,7 @@ describe("pullLibrary-invalid-server", function() {
212213 it ( "should-fail-when-given-an-invalid-port" , function ( ) {
213214 this . timeout ( LONG_TIMEOUT ) ;
214215 wcmHelper . init ( TEST_HOST , BAD_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
215- TEST_PASSWORD , TESTING_FOLDER ) ;
216+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
216217 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( ) {
217218 fail ( "Expected an error" ) ;
218219 } , function ( err ) {
@@ -224,7 +225,7 @@ describe("pullLibrary-invalid-server", function() {
224225 it ( "should-fail-when-given-an-invalid-content-handler" , function ( ) {
225226 this . timeout ( LONG_TIMEOUT ) ;
226227 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER , TEST_USERNAME ,
227- TEST_PASSWORD , TESTING_FOLDER ) ;
228+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
228229 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( ) {
229230 fail ( "Expected an error" ) ;
230231 } , function ( err ) {
@@ -236,7 +237,7 @@ describe("pullLibrary-invalid-server", function() {
236237 it ( "should-fail-when-given-an-invalid-content-handler-subfolder" , function ( ) {
237238 this . timeout ( LONG_TIMEOUT ) ;
238239 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER_WITH_SUBFOLDER , TEST_USERNAME ,
239- TEST_PASSWORD , TESTING_FOLDER ) ;
240+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
240241 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( items ) {
241242 console . log ( "NO ERROR" )
242243 fail ( "Expected an error" ) ;
@@ -250,7 +251,7 @@ describe("pullLibrary-invalid-server", function() {
250251 it ( "should-fail-when-given-an-invalid-username" , function ( ) {
251252 this . timeout ( LONG_TIMEOUT ) ;
252253 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , BAD_USERNAME ,
253- TEST_PASSWORD , TESTING_FOLDER ) ;
254+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
254255 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( items ) {
255256 console . log ( "NO ERROR" )
256257 fail ( "Expected an error" ) ;
@@ -264,7 +265,7 @@ describe("pullLibrary-invalid-server", function() {
264265 it ( "should-fail-when-given-an-invalid-password" , function ( ) {
265266 this . timeout ( LONG_TIMEOUT ) ;
266267 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
267- BAD_PASSWORD , TESTING_FOLDER ) ;
268+ BAD_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
268269 return wcmHelper . pullLibrary ( TESTING_LIBRARY , { includeMeta : false } ) . then ( function ( items ) {
269270 console . log ( "NO ERROR" )
270271 fail ( "Expected an error" ) ;
@@ -280,7 +281,7 @@ describe("pushLibrary-valid-server", function() {
280281 it ( "should-succeed-when-server-is-valid" , function ( done ) {
281282 this . timeout ( LONG_TIMEOUT ) ;
282283 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
283- TEST_PASSWORD , TESTING_FOLDER ) ;
284+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
284285 wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
285286 expect ( true ) . to . equal ( true ) ;
286287 done ( ) ;
@@ -300,7 +301,7 @@ describe("pushLibrary-invalid-server", function() {
300301 it ( "should-fail-when-given-an-invalid-host" , function ( ) {
301302 this . timeout ( LONG_TIMEOUT ) ;
302303 wcmHelper . init ( BAD_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
303- TEST_PASSWORD , TESTING_FOLDER ) ;
304+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
304305 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
305306 fail ( "Expected an error" ) ;
306307 } , function ( err ) {
@@ -313,7 +314,7 @@ describe("pushLibrary-invalid-server", function() {
313314 it ( "should-fail-when-given-an-invalid-port" , function ( ) {
314315 this . timeout ( LONG_TIMEOUT ) ;
315316 wcmHelper . init ( TEST_HOST , BAD_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
316- TEST_PASSWORD , TESTING_FOLDER ) ;
317+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
317318 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
318319 console . log ( "DONE WITHOUT AN ERROR" )
319320 fail ( "Expected an error" ) ;
@@ -327,7 +328,7 @@ describe("pushLibrary-invalid-server", function() {
327328 it ( "should-fail-when-port-is-out-of-range" , function ( ) {
328329 this . timeout ( LONG_TIMEOUT ) ;
329330 wcmHelper . init ( TEST_HOST , 99999999 , TEST_CONTENT_HANDLER , TEST_USERNAME ,
330- TEST_PASSWORD , TESTING_FOLDER ) ;
331+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
331332 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
332333 fail ( "Expected an error" ) ;
333334 } , function ( err ) {
@@ -341,7 +342,7 @@ describe("pushLibrary-invalid-server", function() {
341342 this . timeout ( LONG_TIMEOUT ) ;
342343
343344 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER , TEST_USERNAME ,
344- TEST_PASSWORD , TESTING_FOLDER ) ;
345+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
345346 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
346347 console . log ( "NO ERROR" )
347348 fail ( "Expected an error" ) ;
@@ -355,7 +356,7 @@ describe("pushLibrary-invalid-server", function() {
355356 it ( "should-fail-when-given-an-invalid-content-handler-subfolder" , function ( ) {
356357 this . timeout ( LONG_TIMEOUT ) ;
357358 wcmHelper . init ( TEST_HOST , TEST_PORT , BAD_CONTENT_HANDLER_WITH_SUBFOLDER , TEST_USERNAME ,
358- TEST_PASSWORD , TESTING_FOLDER ) ;
359+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
359360 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
360361 console . log ( "NO ERROR" )
361362 fail ( "Expected an error" ) ;
@@ -369,7 +370,7 @@ describe("pushLibrary-invalid-server", function() {
369370 it ( "should-fail-when-given-an-invalid-username" , function ( ) {
370371 this . timeout ( LONG_TIMEOUT ) ;
371372 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , BAD_USERNAME ,
372- TEST_PASSWORD , TESTING_FOLDER ) ;
373+ TEST_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
373374 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
374375 fail ( "Expected an error" ) ;
375376 } , function ( err ) {
@@ -381,7 +382,7 @@ describe("pushLibrary-invalid-server", function() {
381382 it ( "should-fail-when-given-an-invalid-password" , function ( ) {
382383 this . timeout ( LONG_TIMEOUT ) ;
383384 wcmHelper . init ( TEST_HOST , TEST_PORT , TEST_CONTENT_HANDLER , TEST_USERNAME ,
384- BAD_PASSWORD , TESTING_FOLDER ) ;
385+ BAD_PASSWORD , TEST_SECURE , TESTING_FOLDER ) ;
385386 return wcmHelper . pushLibrary ( TESTING_LIBRARY , true ) . then ( function ( ) {
386387 fail ( "Expected an error" ) ;
387388 } , function ( err ) {
0 commit comments