Skip to content

Commit 76faefe

Browse files
committed
add status message to
1 parent fe0cced commit 76faefe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

internal/orchestrator/helpers_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020

2121
"github.com/docker/docker/api/types/container"
2222
"github.com/stretchr/testify/require"
23-
"go.bug.st/f"
2423
)
2524

2625
func TestParseAppStatus(t *testing.T) {
@@ -82,14 +81,14 @@ func TestParseAppStatus(t *testing.T) {
8281

8382
for _, tc := range tests {
8483
t.Run(tc.name, func(t *testing.T) {
85-
input := f.Map(tc.containerState, func(c container.ContainerState) container.Summary {
86-
return container.Summary{
84+
var input []container.Summary
85+
for i, c := range tc.containerState {
86+
input = append(input, container.Summary{
8787
Labels: map[string]string{DockerAppPathLabel: "path1"},
8888
State: c,
89-
Status: "Exited (129)",
90-
}
91-
})
92-
89+
Status: tc.statusMessage[i],
90+
})
91+
}
9392
res := parseAppStatus(input)
9493
require.Len(t, res, 1)
9594
require.Equal(t, tc.want, res[0].Status)

0 commit comments

Comments
 (0)