Skip to content

Commit

Permalink
e2e: remove SkipNow from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Oct 25, 2024
1 parent d030b19 commit 2b93332
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 173 deletions.
6 changes: 0 additions & 6 deletions internal/test/e2e/blocklist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ import (
)

func TestBlocklist(t *testing.T) {
t.SkipNow() // TODO: re-enable this test

// if testing.Short() {
// t.SkipNow()
// }

ctx := context.Background()

// create a new test cluster
Expand Down
3 changes: 0 additions & 3 deletions internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ func newTestLoggerCustom(level zapcore.Level) *zap.Logger {
// newTestCluster creates a new cluster without hosts with a funded bus.
func newTestCluster(t *testing.T, opts testClusterOptions) *TestCluster {
// Skip any test that requires a cluster when running short tests.
if testing.Short() {
t.SkipNow()
}
tt := test.NewTT(t)

// Ensure we don't hang
Expand Down
92 changes: 1 addition & 91 deletions internal/test/e2e/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ import (
)

func TestObjectsWithNoDelimiter(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// assertMetadata asserts ModTime, ETag and MimeType are set and then clears
// them afterwards so we can compare without having to specify the metadata
start := time.Now()
Expand Down Expand Up @@ -367,10 +363,6 @@ func TestNewTestCluster(t *testing.T) {
// TestObjectsBucket is a test that verifies whether we properly escape bucket
// names.
func TestObjectsBucket(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down Expand Up @@ -405,10 +397,6 @@ func TestObjectsBucket(t *testing.T) {
// would expect. It is similar to the TestObjectEntries unit test, but uses
// the worker and bus client to verify paths are passed correctly.
func TestObjectsWithDelimiterSlash(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// assertMetadata asserts ModTime, ETag and MimeType are set and then clears
// them afterwards so we can compare without having to specify the metadata
start := time.Now()
Expand Down Expand Up @@ -591,10 +579,6 @@ func TestObjectsWithDelimiterSlash(t *testing.T) {

// TestObjectsRename tests renaming objects and downloading them afterwards.
func TestObjectsRename(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down Expand Up @@ -647,10 +631,6 @@ func TestObjectsRename(t *testing.T) {
// TestUploadDownloadEmpty is an integration test that verifies empty objects
// can be uploaded and download correctly.
func TestUploadDownloadEmpty(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand All @@ -676,10 +656,6 @@ func TestUploadDownloadEmpty(t *testing.T) {
// TestUploadDownloadBasic is an integration test that verifies objects can be
// uploaded and download correctly.
func TestUploadDownloadBasic(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// sanity check the default settings
if test.AutopilotConfig.Contracts.Amount < uint64(test.RedundancySettings.MinShards) {
t.Fatal("too few hosts to support the redundancy settings")
Expand Down Expand Up @@ -768,10 +744,6 @@ func TestUploadDownloadBasic(t *testing.T) {
// TestUploadDownloadExtended is an integration test that verifies objects can
// be uploaded and download correctly.
func TestUploadDownloadExtended(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// sanity check the default settings
if test.AutopilotConfig.Contracts.Amount < uint64(test.RedundancySettings.MinShards) {
t.Fatal("too few hosts to support the redundancy settings")
Expand Down Expand Up @@ -1073,10 +1045,6 @@ func TestUploadDownloadSpending(t *testing.T) {
}

func TestContractApplyChainUpdates(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster without autopilot
cluster := newTestCluster(t, testClusterOptions{skipRunningAutopilot: true})
defer cluster.Shutdown()
Expand Down Expand Up @@ -1119,10 +1087,6 @@ func TestContractApplyChainUpdates(t *testing.T) {

// TestEphemeralAccounts tests the use of ephemeral accounts.
func TestEphemeralAccounts(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: 1,
Expand Down Expand Up @@ -1197,10 +1161,6 @@ func TestEphemeralAccounts(t *testing.T) {

// TestParallelUpload tests uploading multiple files in parallel.
func TestParallelUpload(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down Expand Up @@ -1273,10 +1233,6 @@ func TestParallelUpload(t *testing.T) {

// TestParallelDownload tests downloading a file in parallel.
func TestParallelDownload(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down Expand Up @@ -1321,9 +1277,7 @@ func TestParallelDownload(t *testing.T) {
// TestEphemeralAccountSync verifies that setting the requiresSync flag makes
// the autopilot resync the balance between renter and host.
func TestEphemeralAccountSync(t *testing.T) {
if testing.Short() {
t.SkipNow()
} else if mysqlCfg := config.MySQLConfigFromEnv(); mysqlCfg.URI != "" {
if mysqlCfg := config.MySQLConfigFromEnv(); mysqlCfg.URI != "" {
t.Skip("skipping MySQL suite")
}

Expand Down Expand Up @@ -1402,10 +1356,6 @@ func TestEphemeralAccountSync(t *testing.T) {
// TestUploadDownloadSameHost uploads a file to the same host through different
// contracts and tries downloading the file again.
func TestUploadDownloadSameHost(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down Expand Up @@ -1453,10 +1403,6 @@ func TestUploadDownloadSameHost(t *testing.T) {
}

func TestContractArchival(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: 1,
Expand Down Expand Up @@ -1501,10 +1447,6 @@ func TestContractArchival(t *testing.T) {
}

func TestUnconfirmedContractArchival(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a test cluster
cluster := newTestCluster(t, testClusterOptions{hosts: 1})
defer cluster.Shutdown()
Expand Down Expand Up @@ -1558,10 +1500,6 @@ func TestUnconfirmedContractArchival(t *testing.T) {
}

func TestWalletEvents(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
Expand Down Expand Up @@ -1610,10 +1548,6 @@ func TestWalletEvents(t *testing.T) {
}

func TestUploadPacking(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// sanity check the default settings
if test.AutopilotConfig.Contracts.Amount < uint64(test.RedundancySettings.MinShards) {
t.Fatal("too few hosts to support the redundancy settings")
Expand Down Expand Up @@ -1783,10 +1717,6 @@ func TestUploadPacking(t *testing.T) {
}

func TestWallet(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
Expand Down Expand Up @@ -1863,10 +1793,6 @@ func TestWallet(t *testing.T) {
}

func TestSlabBufferStats(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// sanity check the default settings
if test.AutopilotConfig.Contracts.Amount < uint64(test.RedundancySettings.MinShards) {
t.Fatal("too few hosts to support the redundancy settings")
Expand Down Expand Up @@ -1995,10 +1921,6 @@ func TestSlabBufferStats(t *testing.T) {
}

func TestAlerts(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
Expand Down Expand Up @@ -2109,10 +2031,6 @@ func TestAlerts(t *testing.T) {
}

func TestMultipartUploads(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
uploadPacking: true,
Expand Down Expand Up @@ -2442,10 +2360,6 @@ func TestBusRecordedMetrics(t *testing.T) {
}

func TestMultipartUploadWrappedByPartialSlabs(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
uploadPacking: true,
Expand Down Expand Up @@ -2522,10 +2436,6 @@ func TestMultipartUploadWrappedByPartialSlabs(t *testing.T) {
}

func TestWalletRedistribute(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
uploadPacking: true,
Expand Down
8 changes: 0 additions & 8 deletions internal/test/e2e/gouging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (
)

func TestGouging(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a new test cluster
cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
Expand Down Expand Up @@ -136,10 +132,6 @@ func TestGouging(t *testing.T) {
}

func TestHostMinVersion(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a new test cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: int(test.AutopilotConfig.Contracts.Amount),
Expand Down
4 changes: 0 additions & 4 deletions internal/test/e2e/interactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import (
)

func TestInteractions(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a new test cluster
cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
Expand Down
4 changes: 0 additions & 4 deletions internal/test/e2e/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import (
)

func TestObjectMetadata(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create cluster
cluster := newTestCluster(t, testClusterOptions{
hosts: test.RedundancySettings.TotalShards,
Expand Down
4 changes: 0 additions & 4 deletions internal/test/e2e/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (
)

func TestMetrics(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// register start time
start := time.Now()

Expand Down
4 changes: 0 additions & 4 deletions internal/test/e2e/migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import (
)

func TestMigrations(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// configure the cluster to use one extra host
rs := test.RedundancySettings
cfg := test.AutopilotConfig
Expand Down
8 changes: 0 additions & 8 deletions internal/test/e2e/pruning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (
)

func TestHostPruning(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a new test cluster
cluster := newTestCluster(t, testClusterOptions{hosts: 1})
defer cluster.Shutdown()
Expand Down Expand Up @@ -95,10 +91,6 @@ func TestHostPruning(t *testing.T) {
}

func TestSectorPruning(t *testing.T) {
if testing.Short() {
t.SkipNow()
}

// create a cluster
opts := clusterOptsDefault
opts.logger = zap.NewNop()
Expand Down
Loading

0 comments on commit 2b93332

Please sign in to comment.