-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable the config-store-lookup tests
- Loading branch information
Showing
3 changed files
with
15 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,13 @@ async fn json_config_store_lookup_works() -> TestResult { | |
description = "json config_store lookup test" | ||
authors = ["Jill Bryson <[email protected]>", "Rose McDowall <[email protected]>"] | ||
language = "rust" | ||
[local_server] | ||
[local_server.config_stores] | ||
[local_server.config_stores.animals] | ||
file = "../test-fixtures/data/json-config_store.json" | ||
format = "json" | ||
"#; | ||
|
||
let resp = Test::using_fixture("config_store-lookup.wasm") | ||
// let resp = Test::using_fixture("config_store-lookup.wasm") | ||
let resp = Test::using_fixture("config-store-lookup.wasm") | ||
.using_fastly_toml(FASTLY_TOML)? | ||
.against_empty() | ||
.await?; | ||
|
@@ -37,16 +36,14 @@ async fn inline_toml_config_store_lookup_works() -> TestResult { | |
description = "inline toml config_store lookup test" | ||
authors = ["Jill Bryson <[email protected]>", "Rose McDowall <[email protected]>"] | ||
language = "rust" | ||
[local_server] | ||
[local_server.config_stores] | ||
[local_server.config_stores.animals] | ||
format = "inline-toml" | ||
[local_server.config_stores.animals.contents] | ||
dog = "woof" | ||
cat = "meow" | ||
"#; | ||
|
||
let resp = Test::using_fixture("config_store-lookup.wasm") | ||
let resp = Test::using_fixture("config-store-lookup.wasm") | ||
.using_fastly_toml(FASTLY_TOML)? | ||
.against_empty() | ||
.await?; | ||
|
@@ -69,7 +66,7 @@ async fn missing_config_store_works() -> TestResult { | |
language = "rust" | ||
"#; | ||
|
||
let resp = Test::using_fixture("config_store-lookup.wasm") | ||
let resp = Test::using_fixture("config-store-lookup.wasm") | ||
.using_fastly_toml(FASTLY_TOML)? | ||
.against_empty() | ||
.await?; | ||
|
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//! A guest program to test that dictionary lookups work properly. | ||
use fastly::ConfigStore; | ||
|
||
fn main() { | ||
let animals = ConfigStore::open("animals"); | ||
assert_eq!(animals.get("dog").unwrap(), "woof"); | ||
assert_eq!(animals.get("cat").unwrap(), "meow"); | ||
assert_eq!(animals.get("lamp"), None); | ||
} |