Skip to content

Commit 0f03d3d

Browse files
committed
fix
1 parent 884fd45 commit 0f03d3d

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

test/internal/env.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"os"
2222
"os/exec"
23+
"path/filepath"
2324
"strings"
2425
)
2526

@@ -124,6 +125,19 @@ func GCPCredentials() (string, error) {
124125
return credentials, nil
125126
}
126127

128+
func AtlasCLIBin() (string, error) {
129+
path := os.Getenv("ATLAS_E2E_BINARY")
130+
cliPath, err := filepath.Abs(path)
131+
if err != nil {
132+
return "", fmt.Errorf("%w: invalid bin path %q", err, path)
133+
}
134+
135+
if _, err := os.Stat(cliPath); err != nil {
136+
return "", fmt.Errorf("%w: invalid bin %q", err, path)
137+
}
138+
return cliPath, nil
139+
}
140+
127141
func ProfileData() (map[string]string, error) {
128142
cliPath, err := AtlasCLIBin()
129143
if err != nil {

test/internal/helper.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,6 @@ const (
136136
authorizedEmail = "firstname.lastname@example.com"
137137
)
138138

139-
func AtlasCLIBin() (string, error) {
140-
path := os.Getenv("ATLAS_E2E_BINARY")
141-
cliPath, err := filepath.Abs(path)
142-
if err != nil {
143-
return "", fmt.Errorf("%w: invalid bin path %q", err, path)
144-
}
145-
146-
if _, err := os.Stat(cliPath); err != nil {
147-
return "", fmt.Errorf("%w: invalid bin %q", err, path)
148-
}
149-
return cliPath, nil
150-
}
151-
152139
func RandInt(maximum int64) (*big.Int, error) {
153140
return rand.Int(rand.Reader, big.NewInt(maximum))
154141
}

0 commit comments

Comments
 (0)