Skip to content

Commit d555af6

Browse files
committed
Fix acme.sh ci test
1 parent 26f708d commit d555af6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backend/internal/acme/acmesh_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,12 @@ func TestBuildCertRequestArgs(t *testing.T) {
197197
func TestGetAcmeShFilePath(t *testing.T) {
198198
t.Run("basic test", func(t *testing.T) {
199199
path, err := getAcmeShFilePath()
200-
assert.Equal(t, "/bin/acme.sh", path)
201-
assert.Equal(t, nil, err)
200+
if err != nil {
201+
assert.Equal(t, "Cannot find acme.sh execuatable script in PATH: exec: \"acme.sh\": executable file not found in $PATH", err.Error())
202+
assert.Equal(t, "", path)
203+
} else {
204+
assert.Equal(t, "/bin/acme.sh", path)
205+
}
202206
})
203207
}
204208

0 commit comments

Comments
 (0)