(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestLoggingDriver(t *testing.T) { |
| 96 | c := NewCLI(t) |
| 97 | const projectName = "e2e-logging-driver" |
| 98 | defer c.cleanupWithDown(t, projectName) |
| 99 | |
| 100 | host := "HOST=127.0.0.1" |
| 101 | res := c.RunDockerCmd(t, "info", "-f", "{{.OperatingSystem}}") |
| 102 | os := res.Stdout() |
| 103 | if strings.TrimSpace(os) == "Docker Desktop" { |
| 104 | host = "HOST=host.docker.internal" |
| 105 | } |
| 106 | |
| 107 | cmd := c.NewDockerComposeCmd(t, "-f", "fixtures/logging-driver/compose.yaml", "--project-name", projectName, "up", "-d") |
| 108 | cmd.Env = append(cmd.Env, host, "BAR=foo") |
| 109 | icmd.RunCmd(cmd).Assert(t, icmd.Success) |
| 110 | |
| 111 | cmd = c.NewDockerComposeCmd(t, "-f", "fixtures/logging-driver/compose.yaml", "--project-name", projectName, "up", "-d") |
| 112 | cmd.Env = append(cmd.Env, host, "BAR=zot") |
| 113 | icmd.RunCmd(cmd).Assert(t, icmd.Success) |
| 114 | } |
nothing calls this directly
no test coverage detected