mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 19:49:22 +00:00
Explicitly use "" for KEY within the tests
Causes the provided keystore to be used over our keystore.
This commit is contained in:
parent
08c7c1b413
commit
e5afcda76b
2 changed files with 6 additions and 1 deletions
|
@ -8,6 +8,9 @@ pub struct Keystore(sr25519::Pair);
|
||||||
impl Keystore {
|
impl Keystore {
|
||||||
pub fn from_env() -> Option<Self> {
|
pub fn from_env() -> Option<Self> {
|
||||||
let mut key_hex = serai_env::var("KEY")?;
|
let mut key_hex = serai_env::var("KEY")?;
|
||||||
|
if key_hex.is_empty() {
|
||||||
|
None?;
|
||||||
|
}
|
||||||
let mut key = hex::decode(&key_hex).expect("KEY from environment wasn't hex");
|
let mut key = hex::decode(&key_hex).expect("KEY from environment wasn't hex");
|
||||||
key_hex.zeroize();
|
key_hex.zeroize();
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,9 @@ pub fn serai_composition(name: &str) -> TestBodySpecification {
|
||||||
TestBodySpecification::with_image(
|
TestBodySpecification::with_image(
|
||||||
Image::with_repository("serai-dev-serai").pull_policy(PullPolicy::Never),
|
Image::with_repository("serai-dev-serai").pull_policy(PullPolicy::Never),
|
||||||
)
|
)
|
||||||
.replace_env([("SERAI_NAME".to_string(), name.to_lowercase())].into())
|
.replace_env(
|
||||||
|
[("SERAI_NAME".to_string(), name.to_lowercase()), ("KEY".to_string(), String::new())].into(),
|
||||||
|
)
|
||||||
.set_publish_all_ports(true)
|
.set_publish_all_ports(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue