Skip to content

Commit

Permalink
Add 3 project versions for tests to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Feb 24, 2021
1 parent b089cb6 commit e95f5d1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitpod/setup-db.sh
@@ -1,5 +1,14 @@
echo "Creating database..."
mysql -u root -e "create database bugtracker"
php ./admin/upgrade_unattended.php

# Create API key for REST API testing
mysql -u root bugtracker -e "INSERT INTO mantis_api_token_table (user_id, name, hash, date_created, date_used) VALUES (1, 'test api token', 'test-token', 0, 0)"

# Create Project
mysql -u root bugtracker -e "INSERT INTO mantis_project_table (name, enabled, view_state, access_min, category_id, inherit_global, description) VALUES ('Test', 1, 10, 10, 1, 1, '')"

# Create 3 versions as needed by test cases
mysql -u root bugtracker -e "INSERT INTO mantis_project_version_table (project_id, version, description, released) VALUES (1, 'v1', 'version 1', 1)"
mysql -u root bugtracker -e "INSERT INTO mantis_project_version_table (project_id, version, description, released) VALUES (1, 'v2', 'version 2', 1)"
mysql -u root bugtracker -e "INSERT INTO mantis_project_version_table (project_id, version, description, released) VALUES (1, 'v3', 'version 3', 0)"

0 comments on commit e95f5d1

Please sign in to comment.