Merge pull request 'fix: override cookie settings in tests in a separate thread to not delete its value for other tests' (#21) from fix-cookie-secret into master
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Reviewed-on: #21
This commit is contained in:
Aravinth Manivannan 2024-07-11 02:46:37 +05:30
commit 1fba174617
2 changed files with 13 additions and 7 deletions

View file

@ -89,7 +89,8 @@ run: default ## Run debug build
test: ## Run tests
#$(call cache_bust)
cargo test --all-features --no-fail-fast
cargo test --all-features --no-fail-fast -- --skip test_server_env_override
cargo test --all-features --no-fail-fast -- test_server_env_override
#test.coverage.xml: ## Generate cobertura.xml test coverage
# #$(call cache_bust)

View file

@ -58,11 +58,16 @@ mod tests {
server.hostname
);
env_helper!(init_settings, "VANIKAM_server_IP", "1.1.1.1", server.ip);
env_helper!(
init_settings,
"VANIKAM_server_COOKIE_SECRET",
"asdfasdflkjhasdlkfhalksdf",
server.cookie_secret
);
std::thread::spawn(move || {
env_helper!(
init_settings,
"VANIKAM_server_COOKIE_SECRET",
"asdfasdflkjhasdlkfhalksdf",
server.cookie_secret
);
assert!(true);
})
.join()
.unwrap();
}
}