Add nolint directive to TestDockerExec
Some checks failed
test / test non-docker (1.23.x, 0.12.0) (push) Failing after 4s
test / test non-docker (1.23.x, 0.13.0) (push) Failing after 3s
test / test non-docker (1.23.x, 0.13.1) (push) Failing after 3s
test / test non-docker (1.23.x, 0.14.0) (push) Failing after 3s
test / test docker (1.23.x, ) (push) Failing after 27s
test / test docker (1.23.x, ghcr.io/typst/typst:0.14.0) (push) Failing after 16s
test / test docker (1.23.x, ghcr.io/typst/typst:v0.12.0) (push) Failing after 17s
test / test docker (1.23.x, ghcr.io/typst/typst:v0.13.0) (push) Failing after 18s
test / test docker (1.23.x, ghcr.io/typst/typst:v0.13.1) (push) Failing after 17s

This commit is contained in:
David Vogel 2025-11-17 16:03:40 +00:00
parent 245124d082
commit f4745d60f6

View File

@ -17,15 +17,15 @@ import (
func TestDockerExec(t *testing.T) { func TestDockerExec(t *testing.T) {
// Just to ensure that there is no container running. // Just to ensure that there is no container running.
exec.Command("docker", "stop", "-t", "1", "typst-instance").Run() exec.Command("docker", "stop", "-t", "1", "typst-instance").Run() //nolint:errcheck
exec.Command("docker", "rm", "typst-instance").Run() exec.Command("docker", "rm", "typst-instance").Run() //nolint:errcheck
if err := exec.Command("docker", "run", "--name", "typst-instance", "-v", "./test-files:/test-files", "-id", "123marvin123/typst").Run(); err != nil { if err := exec.Command("docker", "run", "--name", "typst-instance", "-v", "./test-files:/test-files", "-id", "123marvin123/typst").Run(); err != nil {
t.Fatalf("Failed to run Docker container: %v.", err) t.Fatalf("Failed to run Docker container: %v.", err)
} }
t.Cleanup(func() { t.Cleanup(func() {
exec.Command("docker", "stop", "-t", "1", "typst-instance").Run() exec.Command("docker", "stop", "-t", "1", "typst-instance").Run() //nolint:errcheck
exec.Command("docker", "rm", "typst-instance").Run() exec.Command("docker", "rm", "typst-instance").Run() //nolint:errcheck
}) })
tests := []struct { tests := []struct {