mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 06:28:42 +01:00
fix: fixes panic in agent with stopped containers (#3167)
This commit is contained in:
@@ -112,18 +112,16 @@ func init() {
|
||||
})
|
||||
|
||||
client.On("FindContainer", "123456").Return(docker.Container{
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
StartedAt: &time.Time{},
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Created: time.Time{},
|
||||
Tty: true,
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Tty: true,
|
||||
Labels: map[string]string{
|
||||
"test": "test",
|
||||
},
|
||||
@@ -147,18 +145,16 @@ func TestFindContainer(t *testing.T) {
|
||||
container, _ := rpc.FindContainer("123456")
|
||||
|
||||
assert.Equal(t, container, docker.Container{
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
StartedAt: &time.Time{},
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Created: time.Time{},
|
||||
Tty: true,
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Tty: true,
|
||||
Labels: map[string]string{
|
||||
"test": "test",
|
||||
},
|
||||
@@ -176,18 +172,16 @@ func TestListContainers(t *testing.T) {
|
||||
|
||||
assert.Equal(t, containers, []docker.Container{
|
||||
{
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
StartedAt: &time.Time{},
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Created: time.Time{},
|
||||
Tty: true,
|
||||
ID: "123456",
|
||||
Name: "test",
|
||||
Host: "localhost",
|
||||
Image: "test",
|
||||
ImageID: "test",
|
||||
State: "running",
|
||||
Health: "healthy",
|
||||
Group: "test",
|
||||
Command: "test",
|
||||
Tty: true,
|
||||
Labels: map[string]string{
|
||||
"test": "test",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user