Giter VIP home page Giter VIP logo

Comments (2)

mattf avatar mattf commented on June 20, 2024 1

the truncation is because i'm running this in a vm. i can confirm it's the same trace...

image

from container-canary.

jacobtomlinson avatar jacobtomlinson commented on June 20, 2024

Thanks for raising this @mattf. We should definitely be handing errors better if the docker command is missing on the system. I would expect tests to fail as docker is a hard dependency right now, but we can make the error messages nicer.

The traceback I'm seeing in the reproducer is truncated, could you just confirm we are seeing the same thing?

$ docker run --rm -it golang bash  # Jump into a container that doesn't have `docker`

$ git clone https://github.com/NVIDIA/container-canary.git /usr/local/src

$ cd /usr/local/src

$ make
go test -v ./...
?       github.com/nvidia/container-canary      [no test files]
=== RUN   TestRoot
--- PASS: TestRoot (0.00s)
=== RUN   TestValidate
    validate_test.go:35:
                Error Trace:    validate_test.go:35
                Error:          Expected nil, but got: &errors.errorString{s:"no such image: container-canary/kubeflow:shouldpass"}
                Test:           TestValidate
                Messages:       should not error
    validate_test.go:36:
                Error Trace:    validate_test.go:36
                Error:          "Cannot find container-canary/kubeflow:shouldpass, pulling..." does not contain "Validating container-canary/kubeflow:shouldpass against kubeflow"
                Test:           TestValidate
                Messages:       did not validate
    validate_test.go:37:
                Error Trace:    validate_test.go:37
                Error:          "Cannot find container-canary/kubeflow:shouldpass, pulling..." does not contain "validation passed"
                Test:           TestValidate
                Messages:       did not pass
--- FAIL: TestValidate (0.00s)
=== RUN   TestValidateFails
    validate_test.go:49:
                Error Trace:    validate_test.go:49
                Error:          "Cannot find container-canary/kubeflow:shouldfail, pulling..." does not contain "validation failed"
                Test:           TestValidateFails
                Messages:       did not fail
--- FAIL: TestValidateFails (0.00s)
=== RUN   TestFileDoesNotExist
--- PASS: TestFileDoesNotExist (0.00s)
=== RUN   TestVersion
Container Canary
--- PASS: TestVersion (0.00s)
FAIL
FAIL    github.com/nvidia/container-canary/cmd  0.012s
?       github.com/nvidia/container-canary/internal     [no test files]
?       github.com/nvidia/container-canary/internal/apis/v1     [no test files]
=== RUN   TestValidator
--- PASS: TestValidator (0.00s)
PASS
ok      github.com/nvidia/container-canary/internal/config      0.035s
=== RUN   TestDockerContainer
    docker_test.go:45: Failed to start container: exec: "docker": executable file not found in $PATH
    docker_test.go:50: Failed to inspect container: exec: "docker": executable file not found in $PATH
--- FAIL: TestDockerContainer (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xaad1b5]

goroutine 7 [running]:
testing.tRunner.func1.2({0xb22f00, 0x113e3e0})
        /usr/local/go/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
        /usr/local/go/src/testing/testing.go:1392 +0x39f
panic({0xb22f00, 0x113e3e0})
        /usr/local/go/src/runtime/panic.go:838 +0x207
github.com/nvidia/container-canary/internal/container.TestDockerContainer(0xc0001fa680)
        /usr/local/src/internal/container/docker_test.go:52 +0x295
testing.tRunner(0xc0001fa680, 0xc49850)
        /usr/local/go/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:1486 +0x35f
FAIL    github.com/nvidia/container-canary/internal/container   0.007s
?       github.com/nvidia/container-canary/internal/validator   [no test files]
FAIL
make: *** [Makefile:30: test] Error 1

from container-canary.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.