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) => {
1043
1043
}
1044
1044
} )
1045
1045
. catch ( err => {
1046
- console . error ( 'error in command execution' , err )
1046
+ // console.error('error in command execution', err)
1047
1047
1048
1048
if ( ui . headless ) {
1049
1049
throw err
Original file line number Diff line number Diff line change @@ -60,9 +60,19 @@ describe('Create api gateway', function() {
60
60
. then ( res => cli . expectOKWithOnly ( '/hello/world' ) ( res )
61
61
. then ( ( ) => res . count )
62
62
. 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}/...
63
65
. 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
+ } )
64
73
. 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 } ) )
66
76
. then ( ui . expectSubset ( { foo : 'bar' } ) )
67
77
. catch ( common . oops ( this ) ) )
68
78
} )
You can’t perform that action at this time.
0 commit comments