RSpec tests won't pass on discourse_dev docker image

Ok, I got it working by doing

git clone -b tests-passed https://github.com/discourse/discourse discourse
cd discourse
./bin/docker/boot_dev
./bin/docker/bundle install --retry=3 --jobs=3
./bin/docker/psql "-c 'ALTER USER discourse WITH SUPERUSER;'"
RAILS_ENV=test ./bin/docker/rake db:drop db:create db:migrate
./bin/docker/bundle exec rspec

Had to change the database permissions for the user ‘discourse’ because otherwise db:drop wouldn’t work.

So from that, I guess there is some kind of stale database setup in the docker image. Would it be possible to get that updated? Or maybe assign enough privileges to the postgres ‘discourse’ user to allow for dropping/creating tables in the discourse_dev image?

5 Likes