MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / set_env

Function set_env

ch_11/src/config.rs:73–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 use super::*;
72
73 fn set_env() {
74 // SAFETY: Tests run single-threaded; no other threads access env vars.
75 unsafe {
76 env::set_var("BAD_WORDS_API_KEY", "API_KEY");
77 env::set_var("PASETO_KEY", "RANDOM WORDS WINTER MACINTOSH PC");
78 env::set_var("POSTGRES_USER", "user");
79 env::set_var("POSTGRES_PASSWORD", "pass");
80 env::set_var("POSTGRES_HOST", "localhost");
81 env::set_var("POSTGRES_PORT", "5432");
82 env::set_var("POSTGRES_DB", "rustwebdev");
83 }
84 }
85
86 #[test]
87 fn unset_and_set_api_key() {

Callers 1

unset_and_set_api_keyFunction · 0.85

Calls

no outgoing calls

Tested by 1

unset_and_set_api_keyFunction · 0.68