aboutsummaryrefslogtreecommitdiff
path: root/src/garage/tests/common/macros.rs
diff options
context:
space:
mode:
authorJill <kokakiwi@deuxfleurs.fr>2022-02-02 15:35:52 +0100
committerJill <kokakiwi@deuxfleurs.fr>2022-02-10 17:55:49 +0100
commitdd407e7041102f52611336bef304c3266a4d6fbe (patch)
tree01582c8158cdfc19a46288e04ea53da95da5a64a /src/garage/tests/common/macros.rs
parentaf261e17895d5d3b3bd0bdfd52b3d0db6a984a20 (diff)
downloadgarage-dd407e7041102f52611336bef304c3266a4d6fbe.tar.gz
garage-dd407e7041102f52611336bef304c3266a4d6fbe.zip
tests: Add garage integration tests (base)
Diffstat (limited to 'src/garage/tests/common/macros.rs')
-rw-r--r--src/garage/tests/common/macros.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/garage/tests/common/macros.rs b/src/garage/tests/common/macros.rs
new file mode 100644
index 00000000..18d0ffeb
--- /dev/null
+++ b/src/garage/tests/common/macros.rs
@@ -0,0 +1,11 @@
+macro_rules! assert_bytes_eq {
+ ($stream:expr, $bytes:expr) => {
+ let data = $stream
+ .collect()
+ .await
+ .expect("Error reading data")
+ .into_bytes();
+
+ assert_eq!(data.as_ref(), $bytes);
+ };
+}