Skip to content

Commit dab7b88

Browse files
committed
fix(tests): improve test descriptions and error messages in TestLoad
1 parent f2496cc commit dab7b88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/orchestrator/app/app_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ import (
2525
)
2626

2727
func TestLoad(t *testing.T) {
28-
t.Run("empty path returns an error", func(t *testing.T) {
28+
t.Run("it fails if tha app path is empty", func(t *testing.T) {
2929
app, err := Load("")
3030
assert.Error(t, err)
3131
assert.Empty(t, app)
32-
assert.Contains(t, err.Error(), "empty")
32+
assert.Contains(t, err.Error(), "empty app path")
3333
})
3434

35-
t.Run("it fails if the app path is an existing file", func(t *testing.T) {
35+
t.Run("it fails if the app path exist but it's a file", func(t *testing.T) {
3636
_, err := Load("testdata/app.yaml")
3737
assert.Error(t, err)
3838
assert.Contains(t, err.Error(), "app path must be a directory")
@@ -44,7 +44,7 @@ func TestLoad(t *testing.T) {
4444
assert.Contains(t, err.Error(), "app path is not valid")
4545
})
4646

47-
t.Run("it load an app correctly", func(t *testing.T) {
47+
t.Run("it loads an app correctly", func(t *testing.T) {
4848
app, err := Load("testdata/AppSimple")
4949
assert.NoError(t, err)
5050
assert.NotEmpty(t, app)

0 commit comments

Comments
 (0)