This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +39
-6
lines changed
standalone-bindles/3cb6fb9875a528c0b030b6366a76991250a8571ab7beffe5b9f37b342aea372e Expand file tree Collapse file tree 5 files changed +39
-6
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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" ]
Original file line number Diff line number Diff line change 11fn 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) ;
Original file line number Diff line number Diff line change 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'
You can’t perform that action at this time.
0 commit comments