cmd/storagenode: skip forget-satellite tests

Change-Id: I630bba8690e48f219d23a966796849a97657a49a
This commit is contained in:
Egon Elbre 2023-10-30 16:04:43 +02:00
parent 9e0fff5e22
commit 9f39684799
3 changed files with 15 additions and 0 deletions

View File

@ -91,6 +91,7 @@ func cmdForgetSatellite(ctx context.Context, log *zap.Logger, cfg *forgetSatelli
if err != nil { if err != nil {
return errs.New("Error starting master database on storagenode: %+v", err) return errs.New("Error starting master database on storagenode: %+v", err)
} }
defer func() { err = errs.Combine(err, db.Close()) }()
satelliteDB := db.Satellites() satelliteDB := db.Satellites()

View File

@ -61,6 +61,8 @@ func Test_newForgetSatelliteCmd_Error(t *testing.T) {
} }
func Test_cmdForgetSatellite(t *testing.T) { func Test_cmdForgetSatellite(t *testing.T) {
t.Skip("The tests and the behavior is currently flaky. See https://github.com/storj/storj/issues/6465")
testplanet.Run(t, testplanet.Config{ testplanet.Run(t, testplanet.Config{
SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0, SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { }, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
@ -70,6 +72,7 @@ func Test_cmdForgetSatellite(t *testing.T) {
store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig) store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err) require.NoError(t, err)
defer ctx.Check(store.Close)
satelliteID := planet.Satellites[0].ID() satelliteID := planet.Satellites[0].ID()
@ -137,6 +140,12 @@ func Test_cmdForgetSatellite(t *testing.T) {
}) })
require.NoError(t, err) require.NoError(t, err)
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// TODO: this is for reproducing the bug,
// remove it once it's fixed.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
time.Sleep(10 * time.Second)
// check that the blob was deleted // check that the blob was deleted
blobInfo, err := store.Stat(ctx, blobRef) blobInfo, err := store.Stat(ctx, blobRef)
require.Error(t, err) require.Error(t, err)
@ -154,6 +163,8 @@ func Test_cmdForgetSatellite(t *testing.T) {
} }
func Test_cmdForgetSatellite_Exclusions(t *testing.T) { func Test_cmdForgetSatellite_Exclusions(t *testing.T) {
t.Skip("The tests and the behavior is currently flaky. See https://github.com/storj/storj/issues/6465")
testplanet.Run(t, testplanet.Config{ testplanet.Run(t, testplanet.Config{
SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0, SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { }, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
@ -163,6 +174,7 @@ func Test_cmdForgetSatellite_Exclusions(t *testing.T) {
store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig) store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err) require.NoError(t, err)
defer ctx.Check(store.Close)
satelliteID := planet.Satellites[0].ID() satelliteID := planet.Satellites[0].ID()

View File

@ -199,6 +199,7 @@ func TestCacheServiceRun(t *testing.T) {
store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig) store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err) require.NoError(t, err)
defer ctx.Check(store.Close)
// Prior to initializing the cache service (which should walk the files), // Prior to initializing the cache service (which should walk the files),
// write a single file so something exists to be counted // write a single file so something exists to be counted
@ -279,6 +280,7 @@ func TestCacheServiceRun_LazyFilewalker(t *testing.T) {
store, err := filestore.NewAt(log, dbConfig.Pieces, dbConfig.Filestore) store, err := filestore.NewAt(log, dbConfig.Pieces, dbConfig.Filestore)
require.NoError(t, err) require.NoError(t, err)
defer ctx.Check(store.Close)
// Prior to initializing the cache service (which should walk the files), // Prior to initializing the cache service (which should walk the files),
// write a single file so something exists to be counted // write a single file so something exists to be counted