1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-26 07:13:41 +01:00

fix: fixes timestamps for finished containers in agent (#3509)

This commit is contained in:
Amir Raminfar
2025-01-06 07:12:02 -08:00
committed by GitHub
parent dae2877bdb
commit 756b212826
7 changed files with 204 additions and 176 deletions

View File

@@ -124,7 +124,10 @@ func init() {
Labels: map[string]string{
"test": "test",
},
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Created: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
StartedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
FinishedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
}, nil)
server, _ := NewServer(client, certs, "test", docker.ContainerFilter{})
@@ -157,7 +160,10 @@ func TestFindContainer(t *testing.T) {
Labels: map[string]string{
"test": "test",
},
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Created: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
StartedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
FinishedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
})
}
@@ -183,7 +189,10 @@ func TestListContainers(t *testing.T) {
Labels: map[string]string{
"test": "test",
},
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Stats: utils.NewRingBuffer[docker.ContainerStat](300),
Created: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
StartedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
FinishedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
},
})
}