Skip to content

Commit b23f91d

Browse files
authored
bump shelljs and fix httpbin errors in toolTest.ts (#79)
1 parent e49dba2 commit b23f91d

File tree

3 files changed

+47
-22
lines changed

3 files changed

+47
-22
lines changed

package-lock.json

Lines changed: 38 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/xml2js": "^0.4.4",
3939
"mocha": "^3.2.0",
4040
"nock": "9.6.1",
41-
"shelljs": "^0.7.6",
41+
"shelljs": "^0.8.4",
4242
"typescript": "3.1.5",
4343
"xml2js": "^0.4.17"
4444
}

test/tests/toolTests.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Tool Tests', function () {
3535

3636
return new Promise<void>(async (resolve, reject) => {
3737
try {
38-
let downPath: string = await toolLib.downloadTool("https://httpbin.org/bytes/100");
38+
let downPath: string = await toolLib.downloadTool("https://httpbingo.org/bytes/100");
3939
toolLib.debug('downloaded path: ' + downPath);
4040

4141
assert(tl.exist(downPath), 'downloaded file exists');
@@ -55,7 +55,7 @@ describe('Tool Tests', function () {
5555
return new Promise<void>(async (resolve, reject) => {
5656
try {
5757

58-
let downPath: string = await toolLib.downloadTool("https://httpbin.org/redirect-to?url=" + encodeURI('https://httpbin.org/bytes/100') + "&status_code=302");
58+
let downPath: string = await toolLib.downloadTool("https://httpbingo.org/redirect-to?url=" + encodeURI('https://httpbin.org/bytes/100') + "&status_code=302");
5959
toolLib.debug('downloaded path: ' + downPath);
6060

6161
assert(tl.exist(downPath), 'downloaded file exists');
@@ -76,7 +76,7 @@ describe('Tool Tests', function () {
7676
try {
7777
let tempDownloadFolder: string = 'temp_' + Math.floor(Math.random() * 2000000000);
7878
let absolutePath: string = path.join(tempPath, tempDownloadFolder);
79-
let downPath: string = await toolLib.downloadTool("https://httpbin.org/bytes/100", absolutePath);
79+
let downPath: string = await toolLib.downloadTool("https://httpbingo.org/bytes/100", absolutePath);
8080
toolLib.debug('downloaded path: ' + downPath);
8181

8282
assert(tl.exist(downPath), 'downloaded file exists');
@@ -93,7 +93,7 @@ describe('Tool Tests', function () {
9393
it('has status code in exception dictionary for HTTP error code responses', async function() {
9494
return new Promise<void>(async(resolve, reject)=> {
9595
try {
96-
let errorCodeUrl: string = "https://httpbin.org/status/400";
96+
let errorCodeUrl: string = "https://httpbingo.org/status/400";
9797
let downPath: string = await toolLib.downloadTool(errorCodeUrl);
9898

9999
reject('a file was downloaded but it shouldnt have been');
@@ -109,7 +109,7 @@ describe('Tool Tests', function () {
109109
it('works with redirect code 302', async function () {
110110
return new Promise<void>(async(resolve, reject)=> {
111111
try {
112-
let statusCodeUrl: string = "https://httpbin.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=302";
112+
let statusCodeUrl: string = "https://httpbingo.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=302";
113113
let downPath: string = await toolLib.downloadTool(statusCodeUrl);
114114

115115
resolve();
@@ -125,7 +125,7 @@ describe('Tool Tests', function () {
125125

126126
return new Promise<void>(async (resolve, reject) => {
127127
try {
128-
let downPath: string = await toolLib.downloadTool("https://httpbin.org/bytes/100");
128+
let downPath: string = await toolLib.downloadTool("https://httpbingo.org/bytes/100");
129129
toolLib.debug('downloaded path: ' + downPath);
130130

131131
assert(tl.exist(downPath), 'downloaded file exists');
@@ -151,8 +151,8 @@ describe('Tool Tests', function () {
151151

152152
return new Promise<void>(async (resolve, reject) => {
153153
try {
154-
let downPath1_1: string = await toolLib.downloadTool("https://httpbin.org/bytes/100");
155-
let downPath1_2: string = await toolLib.downloadTool("https://httpbin.org/bytes/100");
154+
let downPath1_1: string = await toolLib.downloadTool("https://httpbingo.org/bytes/100");
155+
let downPath1_2: string = await toolLib.downloadTool("https://httpbingo.org/bytes/100");
156156

157157
toolLib.cacheFile(downPath1_1, 'foo', 'foo', '1.1.0');
158158
toolLib.cacheFile(downPath1_2, 'foo', 'foo', '1.2.0');

0 commit comments

Comments
 (0)