Skip to content

Commit

Permalink
Merge pull request #14313 from transcom/sequencer_test_improvements-MAIN
Browse files Browse the repository at this point in the history
Sequencer test improvements MAIN
  • Loading branch information
cameroncaci authored Dec 4, 2024
2 parents ccc0cb2 + 62b1e73 commit d391092
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1032,4 +1032,5 @@
20241109002854_add_gsr_table_to_move_history.up.sql
20241111203514_add_external_crate_and_remove_icrtsa.up.sql
20241111223224_change_international_sit_services_to_accessorials.up.sql
20241202163059_create_test_sequence_dev_env.up.sql
20241203024453_add_ppm_max_incentive_column.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Local test migration.
-- This will be run on development environments.
-- It should mirror what you intend to apply on loadtest/demo/exp/stg/prd
-- DO NOT include any sensitive data.

-- Create test_sequence in migration, moved from sequencer_test.go
CREATE SEQUENCE IF NOT EXISTS test_sequence;
4 changes: 1 addition & 3 deletions pkg/db/sequence/sequencer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ type SequenceSuite struct {
}

func (suite *SequenceSuite) SetupTest() {
err := suite.DB().RawQuery("CREATE SEQUENCE IF NOT EXISTS test_sequence;").Exec()
suite.NoError(err, "Error creating test sequence")
err = suite.DB().RawQuery("SELECT setval($1, 1);", testSequence).Exec()
err := suite.DB().RawQuery("SELECT setval($1, 1);", testSequence).Exec()
suite.NoError(err, "Error resetting sequence")
}

Expand Down

0 comments on commit d391092

Please sign in to comment.