mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-25 00:05:17 -04:00
deps: update Go to v1.24.2 (#3750)
* deps: update Go to v1.24.2 * tests: replace context.Background() with t.Context() --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
a7f9561a3d
commit
4e5c213b4d
112 changed files with 287 additions and 316 deletions
|
@ -199,7 +199,7 @@ func TestBackupHelmCharts(t *testing.T) {
|
|||
log: logger.NewTest(t),
|
||||
}
|
||||
|
||||
err := a.backupHelmCharts(context.Background(), tc.helmApplier, tc.includesUpgrades, "")
|
||||
err := a.backupHelmCharts(t.Context(), tc.helmApplier, tc.includesUpgrades, "")
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
|
@ -217,7 +217,7 @@ func TestInitialize(t *testing.T) {
|
|||
require.NoError(fileHandler.WriteJSON(serviceAccPath, tc.serviceAccKey, file.OptNone))
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
ctx := t.Context()
|
||||
ctx, cancel := context.WithTimeout(ctx, 4*time.Second)
|
||||
defer cancel()
|
||||
cmd.SetContext(ctx)
|
||||
|
|
|
@ -138,7 +138,7 @@ func TestRecover(t *testing.T) {
|
|||
require := require.New(t)
|
||||
|
||||
cmd := NewRecoverCmd()
|
||||
cmd.SetContext(context.Background())
|
||||
cmd.SetContext(t.Context())
|
||||
out := &bytes.Buffer{}
|
||||
cmd.SetOut(out)
|
||||
cmd.SetErr(out)
|
||||
|
@ -225,7 +225,7 @@ func TestDoRecovery(t *testing.T) {
|
|||
log: r.log,
|
||||
}
|
||||
|
||||
err := recoverDoer.Do(context.Background())
|
||||
err := recoverDoer.Do(t.Context())
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
} else {
|
||||
|
|
|
@ -139,7 +139,7 @@ func TestGetCompatibleImageMeasurements(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
upgrades, err := getCompatibleImageMeasurements(context.Background(), &bytes.Buffer{}, client, &stubCosignVerifier{}, singleUUIDVerifier(), csp, attestationVariant, versionZero, logger.NewTest(t))
|
||||
upgrades, err := getCompatibleImageMeasurements(t.Context(), &bytes.Buffer{}, client, &stubCosignVerifier{}, singleUUIDVerifier(), csp, attestationVariant, versionZero, logger.NewTest(t))
|
||||
assert.NoError(err)
|
||||
|
||||
for _, measurement := range upgrades {
|
||||
|
@ -344,7 +344,7 @@ func TestNewCLIVersions(t *testing.T) {
|
|||
t.Run(name, func(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
_, err := tc.verCollector.newCLIVersions(context.Background())
|
||||
_, err := tc.verCollector.newCLIVersions(t.Context())
|
||||
if tc.wantErr {
|
||||
require.Error(err)
|
||||
return
|
||||
|
@ -385,7 +385,7 @@ func TestFilterCompatibleCLIVersions(t *testing.T) {
|
|||
t.Run(name, func(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
_, err := tc.verCollector.filterCompatibleCLIVersions(context.Background(), tc.cliPatchVersions, consemver.NewFromInt(1, 24, 5, ""))
|
||||
_, err := tc.verCollector.filterCompatibleCLIVersions(t.Context(), tc.cliPatchVersions, consemver.NewFromInt(1, 24, 5, ""))
|
||||
if tc.wantErr {
|
||||
require.Error(err)
|
||||
return
|
||||
|
|
|
@ -235,7 +235,7 @@ func TestFormatDefault(t *testing.T) {
|
|||
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
_, err := formatDefault(context.Background(), tc.doc, tc.attCfg, logger.NewTest(t))
|
||||
_, err := formatDefault(t.Context(), tc.doc, tc.attCfg, logger.NewTest(t))
|
||||
if tc.wantErr {
|
||||
assert.Error(t, err)
|
||||
} else {
|
||||
|
@ -313,7 +313,7 @@ func TestVerifyClient(t *testing.T) {
|
|||
Nonce: tc.nonce,
|
||||
}
|
||||
|
||||
_, err = verifier.Verify(context.Background(), addr, request, atls.NewFakeValidator(variant.Dummy{}))
|
||||
_, err = verifier.Verify(t.Context(), addr, request, atls.NewFakeValidator(variant.Dummy{}))
|
||||
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue