about summary refs log tree commit diff
path: root/pkgs/tools/admin/pulumi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/admin/pulumi/default.nix')
-rw-r--r--pkgs/tools/admin/pulumi/default.nix57
1 files changed, 29 insertions, 28 deletions
diff --git a/pkgs/tools/admin/pulumi/default.nix b/pkgs/tools/admin/pulumi/default.nix
index 3ff4d18d14787..d63bef2a0270c 100644
--- a/pkgs/tools/admin/pulumi/default.nix
+++ b/pkgs/tools/admin/pulumi/default.nix
@@ -53,32 +53,6 @@ buildGoModule rec {
     "-X github.com/pulumi/pulumi/pkg/v3/version.Version=v${version}"
   ];
 
-  doCheck = true;
-
-  disabledTests = [
-    # Flaky test
-    "TestPendingDeleteOrder"
-    # Tries to clone repo: github.com/pulumi/templates.git
-    "TestGenerateOnlyProjectCheck"
-    # Following tests give this error, not quite sure why:
-    #     Error Trace:    /build/pulumi/pkg/engine/lifecycletest/update_plan_test.go:273
-    # Error:          Received unexpected error:
-    #                 Unexpected diag message: <{%reset%}>using pulumi-resource-pkgA from $PATH at /build/tmp.bS8caxmTx7/pulumi-resource-pkgA<{%reset%}>
-    # Test:           TestUnplannedDelete
-    "TestExpectedDelete"
-    "TestPlannedInputOutputDifferences"
-    "TestPlannedUpdateChangedStack"
-    "TestExpectedCreate"
-    "TestUnplannedDelete"
-    # Following test gives this  error, not sure why:
-    # --- Expected
-    # +++ Actual
-    # @@ -1 +1 @@
-    # -gcp
-    # +aws
-    "TestPluginMapper_MappedNamesDifferFromPulumiName"
-  ];
-
   nativeCheckInputs = [
     git
   ];
@@ -100,12 +74,39 @@ buildGoModule rec {
     rm codegen/{docs,dotnet,go,nodejs,python,schema}/*_test.go
     rm -R codegen/{dotnet,go,nodejs,python}/gen_program_test
 
-    # Only run tests not marked as disabled
-    buildFlagsArray+=("-run" "[^(${lib.concatStringsSep "|" disabledTests})]")
   '' + lib.optionalString stdenv.isDarwin ''
     export PULUMI_HOME=$(mktemp -d)
   '';
 
+  checkFlags =
+    let
+      disabledTests = [
+        # Flaky test
+        "TestPendingDeleteOrder"
+        # Tries to clone repo: github.com/pulumi/templates.git
+        "TestGenerateOnlyProjectCheck"
+        # Following tests give this error, not quite sure why:
+        #     Error Trace:    /build/pulumi/pkg/engine/lifecycletest/update_plan_test.go:273
+        # Error:          Received unexpected error:
+        #                 Unexpected diag message: <{%reset%}>using pulumi-resource-pkgA from $PATH at /build/tmp.bS8caxmTx7/pulumi-resource-pkgA<{%reset%}>
+        # Test:           TestUnplannedDelete
+        "TestExpectedDelete"
+        "TestPlannedInputOutputDifferences"
+        "TestPlannedUpdateChangedStack"
+        "TestExpectedCreate"
+        "TestUnplannedDelete"
+        # Following test gives this  error, not sure why:
+        # --- Expected
+        # +++ Actual
+        # @@ -1 +1 @@
+        # -gcp
+        # +aws
+        "TestPluginMapper_MappedNamesDifferFromPulumiName"
+        "TestProtect"
+      ];
+    in
+    [ "-skip=^${lib.concatStringsSep "$|^" disabledTests}$" ];
+
   # Allow tests that bind or connect to localhost on macOS.
   __darwinAllowLocalNetworking = true;