Skip to content

Commit 89a8b0d

Browse files
committed
chore: fix usage of URL
1 parent 7dfd2c8 commit 89a8b0d

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

eventarc/audit-storage/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(base_url.trim(), route), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

eventarc/generic/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

eventarc/pubsub/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/hello-broken/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const get = (route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return request(URL(base_url.trim(), route), {
24+
return request(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/helloworld/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const get = (route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return request(URL(base_url.trim(), route), {
24+
return request(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/image-processing/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/markdown-preview/renderer/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(route, new URL(base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/pubsub/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

run/system-package/test/system.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
2121
throw Error('"ID_TOKEN" environment variable is required.');
2222
}
2323

24-
return got(URL(base_url.trim(), route), {
24+
return got(new URL(route, base_url.trim()), {
2525
headers: {
2626
Authorization: `Bearer ${ID_TOKEN.trim()}`,
2727
},

0 commit comments

Comments
 (0)