This repository was archived by the owner on Dec 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1043,7 +1043,7 @@ self.exec = (commandUntrimmed, execOptions) => {
10431043 }
10441044 } )
10451045 . catch ( err => {
1046- console . error ( 'error in command execution' , err )
1046+ // console.error('error in command execution', err)
10471047
10481048 if ( ui . headless ) {
10491049 throw err
Original file line number Diff line number Diff line change @@ -60,9 +60,19 @@ describe('Create api gateway', function() {
6060 . then ( res => cli . expectOKWithOnly ( '/hello/world' ) ( res )
6161 . then ( ( ) => res . count )
6262 . then ( N => this . app . client . getAttribute ( `${ ui . selectors . LIST_RESULTS_N ( N ) } [data-key="url"]` , "data-value" ) ) )
63+
64+ // for localhost openwhisk, we have to make sure that the href is of the form http://${apihost}/...
6365 . then ( href => href . replace ( / ( h t t p : \/ \/ ) ? 1 7 2 \. 1 7 \. 0 \. 1 / , ui . apiHost . replace ( / h t t p ( s ) ? : \/ \/ / , '' ) ) )
66+ . then ( href => {
67+ if ( ! href . startsWith ( 'http' ) ) {
68+ return `http://${ href } `
69+ } else {
70+ return href
71+ }
72+ } )
6473 . then ( href => { console . error ( 'api href' , href ) ; return href ; } )
65- . then ( href => rp ( { url : `http://${ href } ?foo=bar` , rejectUnauthorized : false } ) )
74+
75+ . then ( href => rp ( { url : `${ href } ?foo=bar` , rejectUnauthorized : false } ) )
6676 . then ( ui . expectSubset ( { foo : 'bar' } ) )
6777 . catch ( common . oops ( this ) ) )
6878} )
You can’t perform that action at this time.
0 commit comments