aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJill <kokakiwi@deuxfleurs.fr>2022-02-02 16:07:26 +0100
committerJill <kokakiwi@deuxfleurs.fr>2022-02-03 12:55:24 +0100
commit06ad505cb5c8a4c98fdd83f67bdabea332e6689a (patch)
tree693354e4b054eccdb8d19b5388682053e75dd002
parent539b25652502693fed311699829f3bd28e604aa5 (diff)
downloadgarage-06ad505cb5c8a4c98fdd83f67bdabea332e6689a.tar.gz
garage-06ad505cb5c8a4c98fdd83f67bdabea332e6689a.zip
tests: Fix garage integration test
-rw-r--r--.drone.yml3
-rw-r--r--default.nix2
-rw-r--r--src/garage/Cargo.toml2
-rw-r--r--src/garage/tests/common/garage.rs8
4 files changed, 6 insertions, 9 deletions
diff --git a/.drone.yml b/.drone.yml
index 96a3ae13..28f96f58 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -46,7 +46,7 @@ steps:
- name: nix_config
path: /etc/nix
commands:
- - nix-build --no-build-output --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
+ - nix-build --no-build-output --option log-lines 100 --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
- name: unit tests
image: nixpkgs/nix:nixos-21.05
@@ -59,6 +59,7 @@ steps:
- |
nix-build \
--no-build-output \
+ --option log-lines 100 \
--argstr target x86_64-unknown-linux-musl \
--argstr compileMode test
- ./result*/bin/garage_api*
diff --git a/default.nix b/default.nix
index 108d4804..09416208 100644
--- a/default.nix
+++ b/default.nix
@@ -76,7 +76,7 @@ in let
*/
''^(src|tests)'' # fixed default
''.*\.(rs|toml)$'' # fixed default
- ''^(crdt|replication|cli|helper|signature)'' # our crate submodules
+ ''^(crdt|replication|cli|helper|signature|common|ext)'' # our crate submodules
];
};
diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml
index 82ae1896..d6034bbd 100644
--- a/src/garage/Cargo.toml
+++ b/src/garage/Cargo.toml
@@ -8,6 +8,8 @@ description = "Garage, an S3-compatible distributed object store for self-hosted
repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage"
readme = "../../README.md"
+autotests = false
+
[[bin]]
name = "garage"
path = "main.rs"
diff --git a/src/garage/tests/common/garage.rs b/src/garage/tests/common/garage.rs
index e579f03c..97c7a227 100644
--- a/src/garage/tests/common/garage.rs
+++ b/src/garage/tests/common/garage.rs
@@ -179,12 +179,6 @@ index = "index.html"
}
}
-impl Drop for Instance {
- fn drop(&mut self) {
- self.terminate()
- }
-}
-
static mut INSTANCE: MaybeUninit<Instance> = MaybeUninit::uninit();
static INSTANCE_INIT: Once = Once::new();
@@ -192,7 +186,7 @@ static INSTANCE_INIT: Once = Once::new();
extern "C" fn terminate_instance() {
if INSTANCE_INIT.is_completed() {
unsafe {
- INSTANCE.assume_init_drop();
+ INSTANCE.assume_init_mut().terminate();
}
}
}