How can I run atmos go test locally so I can fix t...
# atmos-dev
p
How can I run atmos go test locally so I can fix them before pushing to the PR?
e
What happens when you run “make testacc”
p
Copy code
ake testacc
go get
go: downloading github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
Running acceptance tests
go test $(go list ./...) -v  -timeout 20m
# github.com/cloudposse/atmos/pkg/store
pkg/store/azure_keyvault_store.go:200:15: undefined: ErrInvalidKey
pkg/store/azure_keyvault_store.go:214:41: page.SecretProperties undefined (type azsecrets.ListSecretPropertiesResponse has no field or method SecretProperties)
FAIL    github.com/cloudposse/atmos [build failed]
FAIL    github.com/cloudposse/atmos/cmd [build failed]
FAIL    github.com/cloudposse/atmos/internal/exec [build failed]
?       github.com/cloudposse/atmos/internal/tui/atmos  [no test files]
FAIL    github.com/cloudposse/atmos/internal/tui/components/code_view [build failed]
FAIL    github.com/cloudposse/atmos/internal/tui/templates [build failed]
?       github.com/cloudposse/atmos/internal/tui/templates/term [no test files]
FAIL    github.com/cloudposse/atmos/internal/tui/utils [build failed]
FAIL    github.com/cloudposse/atmos/internal/tui/workflow [build failed]
FAIL    github.com/cloudposse/atmos/pkg/atlantis [build failed]
FAIL    github.com/cloudposse/atmos/pkg/aws [build failed]
FAIL    github.com/cloudposse/atmos/pkg/component [build failed]
FAIL    github.com/cloudposse/atmos/pkg/config [build failed]
=== RUN   TestDir
--- PASS: TestDir (0.04s)
=== RUN   TestExpand
--- PASS: TestExpand (0.00s)
PASS
ok      github.com/cloudposse/atmos/pkg/config/go-homedir       0.214s
?       github.com/cloudposse/atmos/pkg/convert [no test files]
FAIL    github.com/cloudposse/atmos/pkg/describe [build failed]
FAIL    github.com/cloudposse/atmos/pkg/downloader [build failed]
?       github.com/cloudposse/atmos/pkg/errors  [no test files]
?       github.com/cloudposse/atmos/pkg/filetype        [no test files]
FAIL    github.com/cloudposse/atmos/pkg/generate [build failed]
?       github.com/cloudposse/atmos/pkg/git     [no test files]
FAIL    github.com/cloudposse/atmos/pkg/hooks [build failed]
FAIL    github.com/cloudposse/atmos/pkg/list [build failed]
?       github.com/cloudposse/atmos/pkg/list/errors     [no test files]
=== RUN   TestGetCommonListFlags_Success
--- PASS: TestGetCommonListFlags_Success (0.00s)
=== RUN   TestGetCommonListFlags_Errors
=== RUN   TestGetCommonListFlags_Errors/Format_flag_error
2025/04/14 16:48:01 ERRO failed to retrieve format flag error="mock flag error"
=== RUN   TestGetCommonListFlags_Errors/MaxColumns_flag_error
2025/04/14 16:48:01 ERRO failed to retrieve max-columns flag error="mock flag error"
=== RUN   TestGetCommonListFlags_Errors/Delimiter_flag_error
2025/04/14 16:48:01 ERRO failed to retrieve delimiter flag error="mock flag error"
=== RUN   TestGetCommonListFlags_Errors/Stack_flag_error
2025/04/14 16:48:01 ERRO failed to retrieve stack flag error="mock flag error"
=== RUN   TestGetCommonListFlags_Errors/Query_flag_error
2025/04/14 16:48:01 ERRO failed to retrieve query flag error="mock flag error"
--- PASS: TestGetCommonListFlags_Errors (0.00s)
    --- PASS: TestGetCommonListFlags_Errors/Format_flag_error (0.00s)
    --- PASS: TestGetCommonListFlags_Errors/MaxColumns_flag_error (0.00s)
    --- PASS: TestGetCommonListFlags_Errors/Delimiter_flag_error (0.00s)
    --- PASS: TestGetCommonListFlags_Errors/Stack_flag_error (0.00s)
    --- PASS: TestGetCommonListFlags_Errors/Query_flag_error (0.00s)
=== RUN   TestAddCommonListFlags
--- PASS: TestAddCommonListFlags (0.00s)
PASS
ok      github.com/cloudposse/atmos/pkg/list/flags      0.349s
FAIL    github.com/cloudposse/atmos/pkg/list/format [build failed]
FAIL    github.com/cloudposse/atmos/pkg/list/utils [build failed]
FAIL    github.com/cloudposse/atmos/pkg/logger [build failed]
FAIL    github.com/cloudposse/atmos/pkg/merge [build failed]
FAIL    github.com/cloudposse/atmos/pkg/pro [build failed]
FAIL    github.com/cloudposse/atmos/pkg/schema [build failed]
FAIL    github.com/cloudposse/atmos/pkg/spacelift [build failed]
FAIL    github.com/cloudposse/atmos/pkg/stack [build failed]
FAIL    github.com/cloudposse/atmos/pkg/store [build failed]
FAIL    github.com/cloudposse/atmos/pkg/ui/markdown [build failed]
?       github.com/cloudposse/atmos/pkg/ui/theme        [no test files]
FAIL    github.com/cloudposse/atmos/pkg/utils [build failed]
FAIL    github.com/cloudposse/atmos/pkg/validate [build failed]
FAIL    github.com/cloudposse/atmos/pkg/vender [build failed]
?       github.com/cloudposse/atmos/pkg/version [no test files]
FAIL    github.com/cloudposse/atmos/pkg/workflow [build failed]
INFO Smoke tests for atmos CLI starting
INFO Path Manager PATH=/Users/pepe.amengual/github/atmos/build:/Users/pepe.amengual/github/atmos:/opt/homebrew/Cellar/go/1.24.2/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/pepe.amengual/.orbstack/bin
FATAL Discovered atmos binary outside of repository binary=/opt/homebrew/bin/atmos
FAIL    github.com/cloudposse/atmos/tests       0.513s
FAIL
make: *** [testacc] Error 1
e
Not sure why you are getting all those failures. Cc @Andriy Knysh (Cloud Posse) any ideas?
a
@PePe Amengual i think yuo need to run
make build-macos
or
build-linux
(depends on your OS)
p
that will run the tests?
a
Copy code
make build-macos
make testacc
p
which version of go should I use?
a
in
go.mod
, it has
go 1.24.0
, you should install it on your system
👍🏽 1
@PePe Amengual were you able to resolve the issue?
p
I tried to run the test again but failed, I will just switch to main and rerun the tests, it should pass in that case
✅ 1