Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish #338

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions test-fixtures/src/bin/env-vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,31 @@
use std::env;

fn main() {
let id: u64 = env::var("FASTLY_CACHE_GENERATION")
let _generation: u64 = env::var("FASTLY_CACHE_GENERATION")
.expect("cache generation available")
.parse()
.expect("parses as u64");

let sid = env::var("FASTLY_CUSTOMER_ID").expect("customer ID available");
assert_eq!(sid, "0000000000000000000000");
let cid = env::var("FASTLY_CUSTOMER_ID").expect("customer ID available");
assert_eq!(cid, "0000000000000000000000");

let sid = env::var("FASTLY_POP").expect("POP available");
assert_eq!(sid, "XXX");
let pop = env::var("FASTLY_POP").expect("POP available");
assert_eq!(pop, "XXX");

let sid = env::var("FASTLY_REGION").expect("region available");
assert_eq!(sid, "Somewhere");
let region = env::var("FASTLY_REGION").expect("region available");
assert_eq!(region, "Somewhere");

let sid = env::var("FASTLY_SERVICE_ID").expect("service ID available");
assert_eq!(sid, "0000000000000000000000");

let id: u64 = env::var("FASTLY_SERVICE_VERSION")
let version: u64 = env::var("FASTLY_SERVICE_VERSION")
.expect("service version available")
.parse()
.expect("parses as u64");
assert_eq!(version, 0);

let id: u64 = env::var("FASTLY_TRACE_ID")
.expect("trace ID available")
.parse()
.expect("parses as u64");
assert_eq!(id, 0);
let id = env::var("FASTLY_TRACE_ID").expect("trace ID available");
assert_eq!(u64::from_str_radix(&id, 16).expect("parses as u64"), 0);

let host_name = env::var("FASTLY_HOSTNAME").expect("host name available");
assert_eq!(host_name, "localhost");
Expand Down