ubclaunchpad / rocket

:rocket: Slack bot, team management, and onboarding system for UBC Launch Pad - superseded by Rocket2: https://github.com/ubclaunchpad/rocket2
2 stars 0 forks source link

Set up local database for testing #74

Closed bobheadxi closed 6 years ago

bfbachmann commented 6 years ago

@bobheadxi It might be better to just mock out the DB. That way we don't have to worry about setting up and tearing down tables before/after all our tests. It also makes the test setup and Travis config easier.

bobheadxi commented 6 years ago

Depends - it might be a good idea, especially given last night's brief confusion over the SetIsAdmin functionality. I've done a similar Postgres test setup before and it's pretty painless, and Inertia has a setup that allows integration tests to be skipped via a --short flag:

func TestBootstrapIntegration(t *testing.T) {
    if testing.Short() {
        t.Skip("skipping integration test")
    }
        // ...