File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff 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+
127141func ProfileData () (map [string ]string , error ) {
128142 cliPath , err := AtlasCLIBin ()
129143 if err != nil {
Original file line number Diff line number Diff 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-
152139func RandInt (maximum int64 ) (* big.Int , error ) {
153140 return rand .Int (rand .Reader , big .NewInt (maximum ))
154141}
You can’t perform that action at this time.
0 commit comments