Skip to content

Commit 7a084ed

Browse files
committed
fix(routes): stabilize get hosts test without docker daemon
Create local host fixture in TestGetHosts so expected host list is deterministic when Docker is unavailable in CI or local test runs.
1 parent edb7196 commit 7a084ed

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

application/backend/app/routes/routes_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func TestGetHosts(t *testing.T) {
104104
os.MkdirAll("leveldb/hosts/Test2/containers/containerTest1", 0700)
105105
os.MkdirAll("leveldb/hosts/Test2/containers/containerTest2", 0700)
106106
os.MkdirAll("leveldb/hosts/Test2/containers/containerTest3", 0700)
107+
os.MkdirAll("leveldb/hosts/"+util.GetHost()+"/containers", 0700)
107108
req1, _ := http.NewRequest("GET", "/frontend", nil)
108109
req1.AddCookie(&http.Cookie{
109110
Name: "onlogs-cookie",

0 commit comments

Comments
 (0)