about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/admin/scaleway-cli/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix
index 4b1b4ae8f1fa..55ded4e067b2 100644
--- a/pkgs/tools/admin/scaleway-cli/default.nix
+++ b/pkgs/tools/admin/scaleway-cli/default.nix
@@ -23,8 +23,24 @@ buildGoModule rec {
     "-X main.BuildDate=unknown"
   ];
 
-  # some tests require network access to scaleway's API, failing when sandboxed
-  doCheck = false;
+  doCheck = true;
+
+  # Some tests require access to scaleway's API, failing when sandboxed
+  preCheck = ''
+    substituteInPlace internal/core/bootstrap_test.go \
+      --replace "TestInterruptError" "SkipInterruptError"
+    substituteInPlace internal/e2e/errors_test.go \
+      --replace "TestStandardErrors" "SkipStandardErrors"
+    substituteInPlace internal/e2e/human_test.go \
+      --replace "TestTestCommand" "SkipTestCommand" \
+      --replace "TestHumanCreate" "SkipHumanCreate" \
+      --replace "TestHumanList" "SkipHumanList" \
+      --replace "TestHumanUpdate" "SkipHumanUpdate" \
+      --replace "TestHumanGet" "SkipHumanGet" \
+      --replace "TestHumanDelete" "SkipHumanDelete"
+    substituteInPlace internal/e2e/sdk_errors_test.go \
+      --replace "TestSdkStandardErrors" "SkipSdkStandardErrors"
+  '';
 
   meta = with lib; {
     description = "Interact with Scaleway API from the command line";