Skip to content

Commit fe18e55

Browse files
committed
fix(tests): add test case for nil app path in Load function
1 parent 5af6bb3 commit fe18e55

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

internal/orchestrator/app/app_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@ import (
2525
)
2626

2727
func TestLoad(t *testing.T) {
28+
t.Run("it fails if the app path is nil", func(t *testing.T) {
29+
app, err := Load(nil)
30+
assert.Error(t, err)
31+
assert.Empty(t, app)
32+
assert.Contains(t, err.Error(), "empty app path")
33+
})
34+
2835
t.Run("it fails if the app path is empty", func(t *testing.T) {
29-
app, err := Load(path.New(""))
36+
app, err := Load(paths.New(""))
3037
assert.Error(t, err)
3138
assert.Empty(t, app)
3239
assert.Contains(t, err.Error(), "empty app path")

0 commit comments

Comments
 (0)