From 69dc514fcbacc86df3924e0926ee22ddd6980fb9 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Tue, 17 Dec 2019 17:33:23 +0200 Subject: [PATCH] lib/uplink: fix test data race cfg was being modified concurrently. Change-Id: I431f152e7e3f72582f1a7d39967c2496e0e0dc1e --- lib/uplink/bucket_attrs_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/uplink/bucket_attrs_test.go b/lib/uplink/bucket_attrs_test.go index c0683a714..8930e37f3 100644 --- a/lib/uplink/bucket_attrs_test.go +++ b/lib/uplink/bucket_attrs_test.go @@ -35,7 +35,6 @@ func testPlanetWithLibUplink(t *testing.T, cfg testConfig, // as testplanet makes it easy to get another way :D testUplink := planet.Uplinks[0] satellite := planet.Satellites[0] - cfg.uplinkCfg.Volatile.TLS.SkipPeerCAWhitelist = true apiKey, err := uplink.ParseAPIKey(testUplink.APIKey[satellite.ID()].Serialize()) if err != nil { @@ -262,7 +261,10 @@ func TestBucketAttrs(t *testing.T) { } ) - testPlanetWithLibUplink(t, testConfig{}, + cfg := testConfig{} + cfg.uplinkCfg.Volatile.TLS.SkipPeerCAWhitelist = true + + testPlanetWithLibUplink(t, cfg, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, proj *uplink.Project) { before := time.Now() bucket, err := proj.CreateBucket(ctx, bucketName, &inBucketConfig) @@ -323,8 +325,10 @@ func TestBucketAttrsApply(t *testing.T) { } testConfig testConfig ) + // so our test object will not be inlined (otherwise it will lose its RS params) testConfig.uplinkCfg.Volatile.MaxInlineSize = 1 + testConfig.uplinkCfg.Volatile.TLS.SkipPeerCAWhitelist = true testPlanetWithLibUplink(t, testConfig, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, proj *uplink.Project) {