Skip to content

Commit 0d321f8

Browse files
fixed unit test providing unrdered output and re-enabling login tests
1 parent cc3752f commit 0d321f8

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ tasks:
110110
- go test -count=1 {{.F}} github.com/apache/openserverless-cli
111111
- go test -count=1 {{.F}} github.com/apache/openserverless-cli/config
112112
- go test -count=1 {{.F}} github.com/apache/openserverless-cli/tools
113-
- echo TODO go test github.com/apache/openserverless-cli/auth
113+
- go test github.com/apache/openserverless-cli/auth
114114

115115

116116
bats:

auth/login_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ func setupMockServer(t *testing.T, expectedLogin, expectedPass, expectedRes stri
5656
return server
5757
}
5858
func TestLoginCmd(t *testing.T) {
59+
homeDir, _ := homedir.Expand("~/.ops")
60+
os.MkdirAll(homeDir, 0755)
61+
os.Setenv("OPS_HOME", homeDir)
62+
5963
keyring.MockInit()
6064

6165
t.Run("error: returns error when empty password", func(t *testing.T) {

prereq_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func Example_ensurePrereq() {
121121
dir := joinpath(joinpath(workDir, "tests"), "prereq")
122122
fmt.Println(ensurePrereq(dir))
123123
fmt.Println(ensurePrereq(joinpath(dir, "sub")))
124-
// Output:
124+
// Unordered output:
125125
// downloading bun v1.11.20
126126
// downloading coreutils 0.0.27
127127
// <nil>

0 commit comments

Comments
 (0)