Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit 5e8a7b7

Browse files
authored
Merge pull request #173 from technosophos/fix/test-failing-brigade
Fixed test that is failing because of an expired SSL cert
2 parents 113749e + dd131e6 commit 5e8a7b7

File tree

5 files changed

+39
-6
lines changed

5 files changed

+39
-6
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ mod test {
7171
}
7272

7373
const DYNAMIC_ROUTES_SA_ID: &str = "dynamic-routes/0.1.0";
74-
const HTTP_TEST_ID: &str = "http-test/0.1.0";
74+
const HTTP_TEST_ID: &str = "http-test/0.2.0";
7575
const PRINT_ENV_SA_ID: &str = "print-env/0.1.0";
7676
const TOAST_ON_DEMAND_SA_ID: &str = "itowlson/toast-on-demand/0.1.0-ivan-20210924170616069";
7777
const TEST1_MODULE_MAP_FILE: &str = "test1.toml";
@@ -696,7 +696,7 @@ mod test {
696696
let (status, response_text) = futures::executor::block_on(jh).unwrap();
697697

698698
assert_eq!(hyper::StatusCode::OK, status);
699-
assert!(response_text.contains("api.brigade.sh is HEALTHY") ||
700-
response_text.contains("api.brigade.sh is UNHEALTHY"));
699+
assert!(response_text.contains("is HEALTHY") ||
700+
response_text.contains("is UNHEALTHY"));
701701
}
702702
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This is for us during test development.
2+
# Fixtures use their own module config.
3+
4+
[[module]]
5+
route = "/"
6+
# THIS MAKES IT NOT A REAL MODULES.TOML! The test infra replaces the ${...}
7+
# with the right string.
8+
module ="target/wasm32-wasi/release/http-test.wasm"
9+
allowed_hosts = ["https://www.fermyon.com"]

testdata/sources/http-test/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
fn main() {
2-
let url = "https://api.brigade.sh/healthz";
2+
let url = "https://www.fermyon.com/healthz";
33

44
match get_body(url) {
55
Ok((status_code, _)) => {
66
println!("Content-Type: text/plain\n");
77
if status_code == 200 {
8-
println!("api.brigade.sh is HEALTHY");
8+
println!("{} is HEALTHY", url);
99
} else {
10-
println!("api.brigade.sh is UNHEALTHY");
10+
println!("{} is UNHEALTHY", url);
1111
}
1212
},
1313
Err(e) => {
14+
eprintln!("Error in http-test: {}", e);
1415
println!("Status: 500");
1516
println!("Content-Type: text/plain\n");
1617
println!("Failed to make request: {}", e);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
bindleVersion = '1.0.0'
2+
3+
[bindle]
4+
name = 'http-test'
5+
version = '0.2.0'
6+
authors = ['itowlson']
7+
8+
[[parcel]]
9+
[parcel.label]
10+
sha256 = '6eeea5e303121ead2f31dcaa3182b5fd5d194d62a6bf1d58e26b98d318c67af0'
11+
mediaType = 'application/wasm'
12+
name = 'http-test.wasm'
13+
size = 1997174
14+
[parcel.label.feature.wagi]
15+
file = 'false'
16+
route = '/'
17+
allowed_hosts = "https://www.fermyon.com"
18+
19+
[parcel.conditions]
20+
requires = ['target/wasm32-wasi/release/http-test.wasm-files']
21+
22+
[[group]]
23+
name = 'target/wasm32-wasi/release/http-test.wasm-files'

0 commit comments

Comments
 (0)