summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-03-08 23:01:37 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-03-08 23:06:31 +0200
commitac38ecc2673dbe619f4545f3ed1f191c33541c8e (patch)
tree9c1a734298bec3f77861c0fc92b469a085a1ca09 /tests
parentf58178da13a1a5bfa7ea783ebf7e9a9511dd3f11 (diff)
Docker build with the shell set to a relative path so it works
Diffstat (limited to 'tests')
-rw-r--r--tests/server_shell.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/server_shell.rs b/tests/server_shell.rs
index bf3e1d6..4c4587b 100644
--- a/tests/server_shell.rs
+++ b/tests/server_shell.rs
@@ -11,12 +11,15 @@ struct TestContext {
fn build_docker_image() -> Result<()> {
let mut command = std::process::Command::new("docker");
+
+ let absolute_shell_path = cargo_bin(env!("CARGO_PKG_NAME"));
+ let relative_shell_path = absolute_shell_path.strip_prefix(std::fs::canonicalize(".")?)?;
command.args([
"build",
"-t",
"shackle-server",
"--build-arg",
- &format!("SHELL={}", cargo_bin(env!("CARGO_PKG_NAME")).display()),
+ &format!("SHELL={}", relative_shell_path.display()),
"./",
]);