Skip to content

Commit eb2ea83

Browse files
torch2424elliottt
authored andcommitted
All tests now passing!
1 parent 539bac1 commit eb2ea83

File tree

8 files changed

+80
-41
lines changed

8 files changed

+80
-41
lines changed

integration-tests/js-compute/fixtures/env/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ addEventListener("fetch", (event) => {
1616
}
1717

1818
// Build a response
19+
console.log(responseBody)
1920
let response = new Response(responseBody, {
2021
status,
2122
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file describes a Fastly Compute@Edge package. To learn more visit:
2+
# https://developer.fastly.com/reference/fastly-toml/
3+
4+
authors = ["[email protected]"]
5+
description = ""
6+
language = "javascript"
7+
manifest_version = 2
8+
name = "env"
9+
service_id = ""
10+
11+
[local_server]
12+
13+
[local_server.backends]
14+
15+
[local_server.backends.TheOrigin]
16+
url = "https://compute-sdk-test-backend.edgecompute.app/"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file describes a Fastly Compute@Edge package. To learn more visit:
2+
# https://developer.fastly.com/reference/fastly-toml/
3+
4+
authors = ["[email protected]"]
5+
description = ""
6+
language = "javascript"
7+
manifest_version = 2
8+
name = "geoip"
9+
service_id = ""
10+
11+
[local_server]
12+
13+
[local_server.backends]
14+
15+
[local_server.backends.TheOrigin]
16+
url = "https://compute-sdk-test-backend.edgecompute.app/"

integration-tests/js-compute/fixtures/request-limits/fastly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["[email protected]"]
55
description = ""
66
language = "javascript"
77
manifest_version = 2
8-
name = "hello-world"
8+
name = "request-limits"
99
service_id = ""
1010

1111
[local_server]

integration-tests/js-compute/fixtures/request-limits/request-limits.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ addEventListener("fetch", (event) => {
1212

1313
// Loop and add the maximum limit of requests
1414
for (let i = 0; i < numRequestsToMake; i++) {
15-
let request = new Request("http://provider1.org/TheURL", {
16-
body: "JS Body",
17-
method: "POST"
15+
let request = new Request("https://compute-sdk-test-backend.edgecompute.app/", {
16+
method: "GET"
1817
});
1918
let pendingRequest = fetch(request, {
2019
backend: "TheOrigin",

integration-tests/js-compute/fixtures/response-headers/fastly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["[email protected]"]
55
description = ""
66
language = "javascript"
77
manifest_version = 2
8-
name = "hello-world"
8+
name = "response-headers"
99
service_id = ""
1010

1111
[local_server]

integration-tests/js-compute/fixtures/streaming-response/streaming-response.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

integration-tests/js-compute/sdk-test-config.json

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "js-compute SDK",
33
"services": [
44
{
5-
"domain": "todo.edgecompute.app",
6-
"id": "todo"
5+
"domain": "jointly-driven-stag.edgecompute.app",
6+
"id": "5C90J7i8WNPHRbcB32Npxz"
77
},
88
{
9-
"domain": "todo2.edgecompute.app",
10-
"id": "todo2"
9+
"domain": "legally-poetic-crab.edgecompute.app",
10+
"id": "1VkDhW4l5mCzmvSlyk0h34"
1111
}
1212
],
1313
"modules": {
@@ -269,6 +269,45 @@
269269
}
270270
}
271271
}
272+
},
273+
274+
"geoip" : {
275+
"build": "(cd integration-tests/js-compute && npm install && npm run build:test --test=geoip) && (cd ./integration-tests/js-compute/fixtures/geoip && fastly compute pack --verbose --wasm-binary ./geoip.wasm)",
276+
"fastly_toml_path": "./integration-tests/js-compute/fixtures/geoip/fastly.toml",
277+
"wasm_path": "./integration-tests/js-compute/fixtures/geoip/geoip.wasm",
278+
"pkg_path": "./integration-tests/js-compute/fixtures/geoip/pkg/geoip.tar.gz",
279+
"tests": {
280+
"GET /": {
281+
"environments": ["c@e"],
282+
"downstream_request": {
283+
"method": "GET",
284+
"pathname": "/"
285+
},
286+
"downstream_response": {
287+
"status": 200
288+
}
289+
}
290+
}
291+
},
292+
293+
"env" : {
294+
"build": "(cd integration-tests/js-compute && npm install && npm run build:test --test=env) && (cd ./integration-tests/js-compute/fixtures/env && fastly compute pack --verbose --wasm-binary ./env.wasm)",
295+
"fastly_toml_path": "./integration-tests/js-compute/fixtures/env/fastly.toml",
296+
"wasm_path": "./integration-tests/js-compute/fixtures/env/env.wasm",
297+
"pkg_path": "./integration-tests/js-compute/fixtures/env/pkg/env.tar.gz",
298+
"tests": {
299+
"GET /": {
300+
"environments": ["viceroy"],
301+
"downstream_request": {
302+
"method": "GET",
303+
"pathname": "/"
304+
},
305+
"downstream_response": {
306+
"status": 200,
307+
"body": "localhost"
308+
}
309+
}
310+
}
272311
}
273312

274313
}

0 commit comments

Comments
 (0)