Skip to content

nil pointer dereference in test #14

@cjslep

Description

@cjslep

Server crashed due to a nil URL in the server DB, maybe related to #8 :

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5c31da]

goroutine 2962 [running]:
net/url.(*URL).String(0x0, 0xc0003f4000, 0x0)
        net/url/url.go:775 +0x4a
github.com/go-fed/testsuite/server.(*Database).Create(0xc0001b5c00, 0x26137e0, 0xc0001b4cc0, 0x7fc849cbefd8, 0xc0003f4000, 0x0, 0x0)
        github.com/go-fed/testsuite/server/db.go:145 +0x5a
github.com/go-fed/testsuite/server.(*baseTest).helperMustAddToDatabase(0xc0001a7920, 0xc000258160, 0xc0003ca980, 0x7fc849cbefd8, 0xc0003f4000, 0x0)
        github.com/go-fed/testsuite/server/tests.go:276 +0x20f
github.com/go-fed/testsuite/server.newCommonTests.func2(0xc0001a7920, 0xc000258160, 0xc0000b5800, 0x1, 0xe, 0xc0001d6488)
        github.com/go-fed/testsuite/server/tests.go:975 +0x48c
github.com/go-fed/testsuite/server.(*baseTest).MaybeRunResult(0xc0001a7920, 0xc000258160, 0xc0000b5800, 0x1, 0xe, 0x0)
        github.com/go-fed/testsuite/server/tests.go:256 +0x5b
github.com/go-fed/testsuite/server.(*TestRunner).iterate(0xc0001d6480, 0xc000258160, 0x0, 0xd)
        github.com/go-fed/testsuite/server/testrunner.go:106 +0x144
github.com/go-fed/testsuite/server.(*TestRunner).Run.func1(0xc0001d6480, 0xc000258160)
        github.com/go-fed/testsuite/server/testrunner.go:71 +0x412
created by github.com/go-fed/testsuite/server.(*TestRunner).Run
        github.com/go-fed/testsuite/server/testrunner.go:65 +0xda

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions