Skip to content

Commit 6659d18

Browse files
committed
roachtest: allow local execution of tests that need gs fixtures
We recently (in a2ba442) skipped running some tests that need gs fixtures when ran not on gce cloud. However, I think it should be ok to run these tests locally too. Epic: None Release note: None
1 parent 02065f5 commit 6659d18

10 files changed

+12
-12
lines changed

pkg/cmd/roachtest/tests/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ func registerBackup(r registry.Registry) {
895895
Leases: registry.MetamorphicLeases,
896896
EncryptionSupport: registry.EncryptionMetamorphic,
897897
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
898-
if c.Spec().Cloud != spec.GCE {
898+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
899899
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
900900
}
901901
runBackupMVCCRangeTombstones(ctx, t, c, mvccRangeTombstoneConfig{})

pkg/cmd/roachtest/tests/copy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func registerCopy(r registry.Registry) {
185185
Cluster: r.MakeClusterSpec(tc.nodes),
186186
Leases: registry.MetamorphicLeases,
187187
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
188-
if c.Spec().Cloud != spec.GCE {
188+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
189189
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
190190
}
191191
runCopy(ctx, t, c, tc.rows, tc.txn)

pkg/cmd/roachtest/tests/import.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func registerImportNodeShutdown(r registry.Registry) {
9090
Cluster: r.MakeClusterSpec(4),
9191
Leases: registry.MetamorphicLeases,
9292
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
93-
if c.Spec().Cloud != spec.GCE {
93+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
9494
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
9595
}
9696
c.Put(ctx, t.Cockroach(), "./cockroach")
@@ -108,7 +108,7 @@ func registerImportNodeShutdown(r registry.Registry) {
108108
Cluster: r.MakeClusterSpec(4),
109109
Leases: registry.MetamorphicLeases,
110110
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
111-
if c.Spec().Cloud != spec.GCE {
111+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
112112
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
113113
}
114114
c.Put(ctx, t.Cockroach(), "./cockroach")
@@ -225,7 +225,7 @@ func registerImportTPCH(r registry.Registry) {
225225
EncryptionSupport: registry.EncryptionMetamorphic,
226226
Leases: registry.MetamorphicLeases,
227227
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
228-
if c.Spec().Cloud != spec.GCE {
228+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
229229
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
230230
}
231231
tick, perfBuf := initBulkJobPerfArtifacts(t.Name(), item.timeout)

pkg/cmd/roachtest/tests/import_cancellation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func registerImportCancellation(r registry.Registry) {
3737
Cluster: r.MakeClusterSpec(6, spec.CPU(32)),
3838
Leases: registry.MetamorphicLeases,
3939
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
40-
if c.Spec().Cloud != spec.GCE {
40+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
4141
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
4242
}
4343
runImportCancellation(ctx, t, c)

pkg/cmd/roachtest/tests/mixed_version_backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ func registerBackupMixedVersion(r registry.Registry) {
20962096
EncryptionSupport: registry.EncryptionMetamorphic,
20972097
RequiresLicense: true,
20982098
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
2099-
if c.Spec().Cloud != spec.GCE {
2099+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
21002100
t.Skip("uses gs://cockroachdb-backup-testing; see https://github.com/cockroachdb/cockroach/issues/105968")
21012101
}
21022102

pkg/cmd/roachtest/tests/mixed_version_decl_schemachange_compat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func registerDeclSchemaChangeCompatMixedVersions(r registry.Registry) {
3232
Owner: registry.OwnerSQLFoundations,
3333
Cluster: r.MakeClusterSpec(1),
3434
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
35-
if c.Spec().Cloud != spec.GCE {
35+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
3636
t.Skip("uses gs://cockroach-corpus; see https://github.com/cockroachdb/cockroach/issues/105968")
3737
}
3838
runDeclSchemaChangeCompatMixedVersions(ctx, t, c, t.BuildVersion())

pkg/cmd/roachtest/tests/schemachange.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func registerSchemaChangeDuringKV(r registry.Registry) {
3434
Cluster: r.MakeClusterSpec(5),
3535
Leases: registry.MetamorphicLeases,
3636
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
37-
if c.Spec().Cloud != spec.GCE {
37+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
3838
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
3939
}
4040
const fixturePath = `gs://cockroach-fixtures/workload/tpch/scalefactor=10/backup?AUTH=implicit`

pkg/cmd/roachtest/tests/sqlsmith.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ WITH into_db = 'defaultdb', unsafe_restore_incompatible_version;
317317
// NB: sqlsmith failures should never block a release.
318318
NonReleaseBlocker: true,
319319
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
320-
if c.Spec().Cloud != spec.GCE {
320+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
321321
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
322322
}
323323
runSQLSmith(ctx, t, c, setup, setting)

pkg/cmd/roachtest/tests/tpc_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func loadTPCHDataset(
4444
disableMergeQueue bool,
4545
secure bool,
4646
) (retErr error) {
47-
if c.Spec().Cloud != spec.GCE {
47+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
4848
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
4949
}
5050

pkg/cmd/roachtest/tests/tpcdsvec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ WITH unsafe_restore_incompatible_version;
191191
Benchmark: true,
192192
Cluster: r.MakeClusterSpec(3),
193193
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
194-
if c.Spec().Cloud != spec.GCE {
194+
if c.Spec().Cloud != spec.GCE && !c.IsLocal() {
195195
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
196196
}
197197
runTPCDSVec(ctx, t, c)

0 commit comments

Comments
 (0)