-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
493 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
use { | ||
crate::common::{Test, TestResult}, | ||
crate::{ | ||
common::{Test, TestResult}, | ||
viceroy_test, | ||
}, | ||
hyper::{Request, StatusCode}, | ||
}; | ||
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn downstream_request_works() -> TestResult { | ||
viceroy_test!(downstream_request_works, |is_component| { | ||
let req = Request::get("/") | ||
.header("Accept", "text/html") | ||
.header("X-Custom-Test", "abcdef") | ||
.body("Hello, world!")?; | ||
let resp = Test::using_fixture("downstream-req.wasm") | ||
.adapt_component(is_component) | ||
.against(req) | ||
.await?; | ||
|
||
assert_eq!(resp.status(), StatusCode::OK); | ||
Ok(()) | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
//! Tests related to HTTP request and response bodies. | ||
|
||
use { | ||
crate::common::{Test, TestResult}, | ||
crate::{ | ||
common::{Test, TestResult}, | ||
viceroy_test, | ||
}, | ||
hyper::StatusCode, | ||
}; | ||
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn check_hostcalls_implemented() -> TestResult { | ||
viceroy_test!(check_hostcalls_implemented, |is_component| { | ||
let resp = Test::using_fixture("edge-rate-limiting.wasm") | ||
.adapt_component(is_component) | ||
.against_empty() | ||
.await?; | ||
assert_eq!(resp.status(), StatusCode::OK); | ||
Ok(()) | ||
} | ||
}); |
Oops, something went wrong.