diff options
Diffstat (limited to 'src/garage/tests')
-rw-r--r-- | src/garage/tests/common/mod.rs | 3 | ||||
-rw-r--r-- | src/garage/tests/common/util.rs | 13 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/garage/tests/common/mod.rs b/src/garage/tests/common/mod.rs index c40fde0f..32fa3848 100644 --- a/src/garage/tests/common/mod.rs +++ b/src/garage/tests/common/mod.rs @@ -7,7 +7,6 @@ pub mod macros; pub mod client; pub mod ext; pub mod garage; -pub mod util; const REGION: Region = Region::from_static("garage-integ-test"); @@ -28,7 +27,7 @@ impl Context { /// /// Return the created bucket full name. pub fn create_bucket(&self, name: &str) -> String { - let bucket_name = format!("{}-{}", name, util::random_id(6)); + let bucket_name = name.to_owned(); self.garage .command() diff --git a/src/garage/tests/common/util.rs b/src/garage/tests/common/util.rs deleted file mode 100644 index 49c72879..00000000 --- a/src/garage/tests/common/util.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub fn random_id(len: usize) -> String { - use rand::distributions::Slice; - use rand::Rng; - - static ALPHABET: &[u8] = b"abcdefghijklmnopqrstuvwxyz0123456789."; - - let rng = rand::thread_rng(); - rng.sample_iter(Slice::new(ALPHABET).unwrap()) - .map(|b| char::from(*b)) - .filter(|c| c.is_ascii_lowercase() || c.is_ascii_digit()) - .take(len) - .collect() -} |