Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integration/internal/acc/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
)

// Detects if test is run from "debug test" feature in VS Code.
func isInDebug() bool {
func IsInDebug() bool {
ex, _ := os.Executable()
return strings.HasPrefix(path.Base(ex), "__debug_bin")
}

// Loads debug environment from ~/.databricks/debug-env.json.
func loadDebugEnvIfRunFromIDE(t testutil.TestingT, key string) {
if !isInDebug() {
if !IsInDebug() {
return
}
home, err := os.UserHomeDir()
Expand Down
4 changes: 3 additions & 1 deletion integration/internal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import (
"fmt"
"os"
"testing"

"github.com/databricks/cli/integration/internal/acc"
)

// Main is the entry point for integration tests.
// We use this for all integration tests defined in this subtree to ensure
// they are not inadvertently executed when calling `go test ./...`.
func Main(m *testing.M) {
value := os.Getenv("CLOUD_ENV")
if value == "" {
if value == "" && !acc.IsInDebug() {
fmt.Println("CLOUD_ENV is not set, skipping integration tests")
return
}
Expand Down
Loading