DEV Community

Discussion on: Using Cypress with Django and Vue for integration testing in GitLab CI

Collapse
 
briancaffey profile image
Brian Caffey

Hi, it has been a while since I looked at this, but I think that recreate_db is from another repo I was referencing: github.com/testdrivenio/testdriven.... There is another line from my code docker-compose -f docker-compose.ci.yml up -d --build that starts the database and runs migrations.

I think I removed the start_ci.sh file that is referenced by docker-compose.ci.yml, but this is where the database migration command would have been called, as well as any other custom management command used to seed data. In this way, I'm seeding the database from docker-compose commands, not from Cypress. Did you want to seed the database from Cypress itself?

Collapse
 
aaronm14 profile image
Aaron Mead

Ugh, I accidentally reloaded the page after having a more thoughtful response here, ha. But know that your references helped.

I ultimately used a shell script to drop & recreate db, then a custom Django command to seed it using Django test factories already being used by an existing Selenium test suite.