• Matt Rasmus's avatar
    test(tiller): cover crash fixed by #4630 (#4853) · 0522b34e
    Matt Rasmus authored
    While investigating a tiller crash on v2.10.0 (see recent comments in #3125), I pulled down the code
    and wrote a test replicating the crash I was experiencing. I then
    realized that the crash had been fixed, and was able to locate the fix
    in #4630 after running a quck bisect.
    
    Since there don't appear to be any tests that cover this crash, and I
    had written one myself, I figured I might as well put up a PR for it.
    
    Here's what the test failure on v2.10.0 looks like:
    ```
    -- FAIL: TestUpdateReleasePendingInstall_Force (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=0x50 pc=0x1d128d8]
    
    goroutine 235 [running]:
    testing.tRunner.func1(0xc420493c20)
            /usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:742 +0x29d
    panic(0x1eb8d80, 0x2a12db0)
            /usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
    k8s.io/helm/pkg/tiller.(*ReleaseServer).performUpdateForce(0xc4208210b0, 0xc4202c6dc0, 0x0, 0x0, 0x2174220)
            /Users/mattrasmus/go/src/k8s.io/helm/pkg/tiller/release_update.go:166 +0x188
    k8s.io/helm/pkg/tiller.(*ReleaseServer).UpdateRelease(0xc4208210b0, 0x2191780, 0xc420820f30, 0xc4202c6dc0, 0x29aeb90, 0x38, 0x2d2)
            /Users/mattrasmus/go/src/k8s.io/helm/pkg/tiller/release_update.go:43 +0x245
    k8s.io/helm/pkg/tiller.TestUpdateReleasePendingInstall_Force(0xc420493c20)
            /Users/mattrasmus/go/src/k8s.io/helm/pkg/tiller/release_update_test.go:549 +0x120
    testing.tRunner(0xc420493c20, 0x20e5c70)
            /usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:777 +0xd0
    created by testing.(*T).Run
            /usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:824 +0x2e0
    FAIL    k8s.io/helm/pkg/tiller  0.118s
    ```
    Signed-off-by: 's avatarMatt Rasmus <mrasmus@betterworks.com>
    0522b34e
Name
Last commit
Last update
.circleci Loading commit data...
.github Loading commit data...
_proto Loading commit data...
cmd Loading commit data...
docs Loading commit data...
pkg Loading commit data...
rootfs Loading commit data...
scripts Loading commit data...
testdata Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
SECURITY_CONTACTS Loading commit data...
code-of-conduct.md Loading commit data...
glide.lock Loading commit data...
glide.yaml Loading commit data...
versioning.mk Loading commit data...