22package cli
33
44import (
5+ "strings"
56 "testing"
67
78 "github.com/keboola/keboola-as-code/internal/pkg/utils/testhelper"
@@ -14,9 +15,31 @@ func TestCliE2E(t *testing.T) {
1415
1516 binaryPath := testhelper .CompileBinary (t , "cli" , "build-local" )
1617
18+ // List of tests to skip
19+ skipTests := map [string ]bool {
20+ "push/config-data-gateway-push-and-push-dry-run" : true ,
21+ "push/empty-data-gateway" : true ,
22+ }
23+
1724 runner .
1825 NewRunner (t ).
1926 ForEachTest (func (test * runner.Test ) {
27+ // Skip specific tests based on test name
28+ testName := test .T ().Name ()
29+ // Test name format is "TestCliE2E/push/empty-data-gateway" (Unix)
30+ // or "TestCliE2E/push\empty-data-gateway" (Windows)
31+ // Normalize path separators to forward slashes for cross-platform compatibility
32+ normalizedTestName := strings .ReplaceAll (testName , "\\ " , "/" )
33+ // Extract the part after the first "/" (which is the test function name)
34+ parts := strings .Split (normalizedTestName , "/" )
35+ if len (parts ) > 1 {
36+ relativePath := strings .Join (parts [1 :], "/" )
37+ if skipTests [relativePath ] {
38+ test .T ().Skipf ("Skipping test: %s" , relativePath )
39+ return
40+ }
41+ }
42+
2043 test .Run (
2144 runner .WithCopyInToWorkingDir (),
2245 runner .WithInitProjectState (),
0 commit comments