Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Sep 11, 2024
1 parent 3c06579 commit c0f2008
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ var (
Use: "reset",
Short: "Resets the local database to current migrations",
RunE: func(cmd *cobra.Command, args []string) error {
utils.Config.Db.Seed.Enabled = !noSeed
if noSeed {
utils.Config.Db.Seed.Enabled = false
}
return reset.Run(cmd.Context(), migrationVersion, flags.DbConfig, afero.NewOsFs())
},
}
Expand Down
1 change: 1 addition & 0 deletions internal/db/reset/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ func TestResetRemote(t *testing.T) {
// Check error
assert.NoError(t, err)
})

t.Run("resets remote database with seed config disabled", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
Expand Down

0 comments on commit c0f2008

Please sign in to comment.