1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

chore: send server id by loading system info (#2936)

This commit is contained in:
Amir Raminfar
2024-05-07 18:18:51 -07:00
committed by GitHub
parent d37c1395cb
commit 8a2640cd6b
9 changed files with 116 additions and 60 deletions

View File

@@ -8,6 +8,7 @@ import (
"io/fs"
"github.com/amir20/dozzle/internal/docker"
"github.com/docker/docker/api/types/system"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/mock"
@@ -63,6 +64,10 @@ func (m *MockedClient) IsSwarmMode() bool {
return false
}
func (m *MockedClient) SystemInfo() system.Info {
return system.Info{ID: "123"}
}
func createHandler(client docker.Client, content fs.FS, config Config) *chi.Mux {
if client == nil {
client = new(MockedClient)