Skip to content

Commit 673b93c

Browse files
authored
sa: clean up config gates in tests (#7923)
Remove the gates for the paused and revokedCertificates tables, which are now live and in `config`. Refine the documentation for the orderModelv2 migration.
1 parent 01ed436 commit 673b93c

File tree

1 file changed

+3
-49
lines changed

1 file changed

+3
-49
lines changed

sa/sa_test.go

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,8 @@ func TestOrderWithOrderModelv1(t *testing.T) {
13541354
}
13551355

13561356
func TestOrderWithOrderModelv2(t *testing.T) {
1357-
// This test requires the config-next db schema to run.
13581357
if !strings.Contains(os.Getenv("BOULDER_CONFIG_DIR"), "test/config-next") {
1359-
t.Skip()
1358+
t.Skip("Test requires 20240304000000_CertificateProfiles.sql migration to have run")
13601359
}
13611360

13621361
sa, fc, cleanup := initSA(t)
@@ -1471,9 +1470,8 @@ func TestOrderWithOrderModelv2(t *testing.T) {
14711470
}
14721471

14731472
func TestOrderModelMigration(t *testing.T) {
1474-
// This test requires the config-next db schema to run.
14751473
if !strings.Contains(os.Getenv("BOULDER_CONFIG_DIR"), "test/config-next") {
1476-
t.Skip()
1474+
t.Skip("Test requires 20240304000000_CertificateProfiles.sql migration to have run")
14771475
}
14781476

14791477
sa, fc, cleanup := initSA(t)
@@ -1508,9 +1506,8 @@ func TestOrderModelMigration(t *testing.T) {
15081506
}
15091507

15101508
func TestOrderModelMigrationRollback(t *testing.T) {
1511-
// This test requires the config-next db schema to run.
15121509
if !strings.Contains(os.Getenv("BOULDER_CONFIG_DIR"), "test/config-next") {
1513-
t.Skip()
1510+
t.Skip("Test requires 20240304000000_CertificateProfiles.sql migration to have run")
15141511
}
15151512

15161513
sa, fc, cleanup := initSA(t)
@@ -2076,10 +2073,6 @@ func TestRevokeCertificate(t *testing.T) {
20762073
}
20772074

20782075
func TestRevokeCertificateWithShard(t *testing.T) {
2079-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
2080-
t.Skip("Test requires revokedCertificates database table")
2081-
}
2082-
20832076
sa, fc, cleanUp := initSA(t)
20842077
defer cleanUp()
20852078

@@ -2241,10 +2234,6 @@ func TestUpdateRevokedCertificate(t *testing.T) {
22412234
}
22422235

22432236
func TestUpdateRevokedCertificateWithShard(t *testing.T) {
2244-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
2245-
t.Skip("Test requires revokedCertificates database table")
2246-
}
2247-
22482237
sa, fc, cleanUp := initSA(t)
22492238
defer cleanUp()
22502239

@@ -2302,10 +2291,6 @@ func TestUpdateRevokedCertificateWithShard(t *testing.T) {
23022291
}
23032292

23042293
func TestUpdateRevokedCertificateWithShardInterim(t *testing.T) {
2305-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
2306-
t.Skip("Test requires revokedCertificates database table")
2307-
}
2308-
23092294
sa, fc, cleanUp := initSA(t)
23102295
defer cleanUp()
23112296

@@ -3372,10 +3357,6 @@ func TestGetRevokedCerts(t *testing.T) {
33723357
}
33733358

33743359
func TestGetRevokedCertsByShard(t *testing.T) {
3375-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
3376-
t.Skip("Test requires revokedCertificates database table")
3377-
}
3378-
33793360
sa, _, cleanUp := initSA(t)
33803361
defer cleanUp()
33813362

@@ -3893,10 +3874,6 @@ func TestUpdateCRLShard(t *testing.T) {
38933874
}
38943875

38953876
func TestReplacementOrderExists(t *testing.T) {
3896-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
3897-
t.Skip("Test requires replacementOrders database table")
3898-
}
3899-
39003877
sa, fc, cleanUp := initSA(t)
39013878
defer cleanUp()
39023879

@@ -4120,9 +4097,6 @@ func TestGetSerialsByAccount(t *testing.T) {
41204097
}
41214098

41224099
func TestUnpauseAccount(t *testing.T) {
4123-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4124-
t.Skip("Test requires paused database table")
4125-
}
41264100
sa, _, cleanUp := initSA(t)
41274101
defer cleanUp()
41284102

@@ -4249,10 +4223,6 @@ func bulkInsertPausedIdentifiers(ctx context.Context, sa *SQLStorageAuthority, c
42494223
}
42504224

42514225
func TestUnpauseAccountWithTwoLoops(t *testing.T) {
4252-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4253-
t.Skip("Test requires paused database table")
4254-
}
4255-
42564226
sa, _, cleanUp := initSA(t)
42574227
defer cleanUp()
42584228

@@ -4265,10 +4235,6 @@ func TestUnpauseAccountWithTwoLoops(t *testing.T) {
42654235
}
42664236

42674237
func TestUnpauseAccountWithMaxLoops(t *testing.T) {
4268-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4269-
t.Skip("Test requires paused database table")
4270-
}
4271-
42724238
sa, _, cleanUp := initSA(t)
42734239
defer cleanUp()
42744240

@@ -4281,9 +4247,6 @@ func TestUnpauseAccountWithMaxLoops(t *testing.T) {
42814247
}
42824248

42834249
func TestPauseIdentifiers(t *testing.T) {
4284-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4285-
t.Skip("Test requires paused database table")
4286-
}
42874250
sa, _, cleanUp := initSA(t)
42884251
defer cleanUp()
42894252

@@ -4465,9 +4428,6 @@ func TestPauseIdentifiers(t *testing.T) {
44654428
}
44664429

44674430
func TestCheckIdentifiersPaused(t *testing.T) {
4468-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4469-
t.Skip("Test requires paused database table")
4470-
}
44714431
sa, _, cleanUp := initSA(t)
44724432
defer cleanUp()
44734433

@@ -4609,9 +4569,6 @@ func TestCheckIdentifiersPaused(t *testing.T) {
46094569
}
46104570

46114571
func TestGetPausedIdentifiers(t *testing.T) {
4612-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4613-
t.Skip("Test requires paused database table")
4614-
}
46154572
sa, _, cleanUp := initSA(t)
46164573
defer cleanUp()
46174574

@@ -4721,9 +4678,6 @@ func TestGetPausedIdentifiers(t *testing.T) {
47214678
}
47224679

47234680
func TestGetPausedIdentifiersOnlyUnpausesOneAccount(t *testing.T) {
4724-
if os.Getenv("BOULDER_CONFIG_DIR") != "test/config-next" {
4725-
t.Skip("Test requires paused database table")
4726-
}
47274681
sa, _, cleanUp := initSA(t)
47284682
defer cleanUp()
47294683

0 commit comments

Comments
 (0)