-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into SNOW-1789666-azure-core-http-deprecated
- Loading branch information
Showing
3 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,7 +150,7 @@ describe('getProxyEnv function test ', function () { | |
{ | ||
name: 'HTTP PROXY with authentication', | ||
isHttps: false, | ||
httpProxy: 'http://hello:[email protected]:8080', | ||
httpProxy: 'http://hello:[email protected]:8080', //# pragma: allowlist secret | ||
httpsProxy: undefined, | ||
noProxy: '*.amazonaws.com,*.my_company.com', | ||
result: { | ||
|
@@ -165,7 +165,7 @@ describe('getProxyEnv function test ', function () { | |
{ | ||
name: 'HTTPS PROXY with authentication without NO proxy', | ||
isHttps: true, | ||
httpsProxy: 'https://user:[email protected]:1234', | ||
httpsProxy: 'https://user:[email protected]:1234', //# pragma: allowlist secret | ||
result: { | ||
host: 'myproxy.server.com', | ||
user: 'user', | ||
|
@@ -187,6 +187,42 @@ describe('getProxyEnv function test ', function () { | |
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com', | ||
}, | ||
}, | ||
{ | ||
name: 'HTTPS PROXY with authentication without port and protocol', | ||
isHttps: true, | ||
noProxy: '*.amazonaws.com,*.my_company.com,*.test.com', | ||
httpsProxy: 'myproxy.server.com', | ||
result: { | ||
host: 'myproxy.server.com', | ||
port: 80, | ||
protocol: 'http:', | ||
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com', | ||
}, | ||
}, | ||
{ | ||
name: 'HTTP PROXY with authentication without port and protocol', | ||
isHttps: false, | ||
noProxy: '*.amazonaws.com,*.my_company.com,*.test.com', | ||
httpProxy: 'myproxy.server.com', | ||
result: { | ||
host: 'myproxy.server.com', | ||
port: 80, | ||
protocol: 'http:', | ||
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com', | ||
}, | ||
}, | ||
{ | ||
name: 'HTTPS PROXY with authentication without port', | ||
isHttps: true, | ||
noProxy: '*.amazonaws.com,*.my_company.com,*.test.com', | ||
httpsProxy: 'https://myproxy.server.com', | ||
result: { | ||
host: 'myproxy.server.com', | ||
port: 443, | ||
protocol: 'https:', | ||
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com', | ||
} | ||
} | ||
]; | ||
|
||
testCases.forEach(({ name, isHttps, httpsProxy, httpProxy, noProxy, result }) => { | ||
|
@@ -265,11 +301,11 @@ describe('Proxy Util for Azure', function () { | |
it('test hide and restore environment proxy', function () { | ||
const testCases = | ||
{ | ||
httpProxy: 'https://user:[email protected]:1234', | ||
httpsProxy: 'https://user:[email protected]:1234', | ||
httpProxy: 'https://user:[email protected]:1234', //# pragma: allowlist secret | ||
httpsProxy: 'https://user:[email protected]:1234', //# pragma: allowlist secret | ||
noProxy: '*.amazonaws.com,*.my_company.com', | ||
HttpProxy: 'https://user:[email protected]:1234', | ||
HttpsProxy: 'https://user:[email protected]:1234', | ||
HttpProxy: 'https://user:[email protected]:1234', //# pragma: allowlist secret | ||
HttpsProxy: 'https://user:[email protected]:1234', //# pragma: allowlist secret | ||
NoProxy: '*.amazonaws2.com,*.my_company2.com', | ||
}; | ||
|
||
|