gdk reset-data does not restore test database
Overview
After running gdk reset-data (with and without --fast) test database does not contain any schema.
A typical error users see:
macbookpro@MacBooks-MacBook-Pro gitlab % bundle exec rake db:migrate
macbookpro@MacBooks-MacBook-Pro gitlab % bundle exec rspec spec/models/approval_spec.rb
An error occurred while loading ./spec/models/approval_spec.rb.
Failure/Error: super(connection, underlying_table(connection, table_name))
ActiveRecord::StatementInvalid:
PG::UndefinedTable: ERROR: relation "application_settings" does not exist
LINE 10: WHERE a.attrelid = '"application_settings"'::regclass
Users must run:
RAILS_ENV=test bundle exec rake db:schema:load
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate (optional)
gdk reset-data (--fast)
gdk psql -d gitlabhq_test
\psql (16.10)
Type "help" for help.
gitlabhq_test=# \d
Did not find any relations.
Proposal (optional)
Load schema for RAILS_ENV=test.
Environment (optional)
- Operating system name:
<!-- output of `uname -a` command --> - Architecture:
<!-- output of `arch` or `uname -m` command --> - The contents of your
gdk.yml(if any) - Ruby version:
<!-- output of `ruby --version` command --> - GDK version:
<!-- output of `git rev-parse --short HEAD` command -->
Edited by Peter Leitzen