Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shyftdbtest does not exist #106

Closed
ansermino opened this issue Oct 3, 2018 · 1 comment
Closed

shyftdbtest does not exist #106

ansermino opened this issue Oct 3, 2018 · 1 comment
Assignees

Comments

@ansermino
Copy link

System information

(development branch)

Geth
Version: 1.8.3-unstable
Git Commit: fca85ebb8ac1a3f49e28f92535ff9c64d6ea0cf1
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10
Operating System: linux
GOPATH=
GOROOT=/usr/local/go

Expected behaviour

shyftdbtest table is cleared a and empty table created.

Actual behaviour

Running go test ./test errors:

go: disabling cache (/home/david/.cache/go-build) due to initialization failure: open /home/david/.cache/go-build/log.txt: permission denied
--- FAIL: TestVM (0.12s)
panic: pq: database "shyftdbtest" does not exist [recovered]
	panic: pq: database "shyftdbtest" does not exist

goroutine 36 [running]:
testing.tRunner.func1(0xc4203825a0)
	/usr/local/go/src/testing/testing.go:742 +0x29d
panic(0xbdfa00, 0xc420330240)
	/usr/local/go/src/runtime/panic.go:505 +0x229
github.com/ShyftNetwork/go-empyrean/core.BlockExists(0xc42003da40, 0x42, 0x704059d4be25755c)
	/home/david/go/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:215 +0x1f6
github.com/ShyftNetwork/go-empyrean/core.SetupGenesisBlock(0xdd5ce0, 0xc4200f8000, 0xc4204240b0, 0x7fd9736ff000, 0x0, 0x0, 0x0, 0x0, 0xc420001e00, 0xc420087ee8)
	/home/david/go/src/github.com/ShyftNetwork/go-empyrean/core/genesis.go:266 +0x24e
github.com/ShyftNetwork/go-empyrean/eth.SNew(0xc420001e00, 0xc42000c500, 0x4262c8, 0x180)
	/home/david/go/src/github.com/ShyftNetwork/go-empyrean/eth/backend.go:111 +0x76
github.com/ShyftNetwork/go-empyrean/eth.InitTracerEnv()
	/home/david/go/src/github.com/ShyftNetwork/go-empyrean/eth/shyft_tracer.go:30 +0xe1
github.com/ShyftNetwork/go-empyrean/tests.TestVM(0xc4203825a0)
	/home/david/go/src/github.com/ShyftNetwork/go-empyrean/tests/vm_test.go:62 +0x12a
testing.tRunner(0xc4203825a0, 0xd44740)
	/usr/local/go/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:824 +0x2e0
FAIL	github.com/ShyftNetwork/go-empyrean/tests	0.598s

Steps to reproduce the behaviour

  1. Clone repo
  2. Ensure test submodule is initialized: git submodule init && git submodule update
  3. Start postgres with shyftdbtest table
  4. Run go test ./test
@ansermino ansermino added the bug Something isn't working label Oct 3, 2018
@dbkbali dbkbali removed the bug Something isn't working label Oct 5, 2018
@dbkbali
Copy link

dbkbali commented Oct 5, 2018

@ansermino closing this as this isn't a bug - but it appears that you haven't installed postgresql so that your development user has superuser privileges and that there is no password required to connect to the development postgres instance . If you wish to install the db locally with db access for your development user - you need to ensure the install process you are using creates a user - for your development user with superuser privileges. Most standard install processes for using postgresql in development do this automatically. If you used a process for installing your postgresql that didn't do this you can use the createuser command (available to the postgresql user created at installation) to acheive this - documentation here https://www.postgresql.org/docs/10/static/app-createuser.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants