mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 14:26:23 -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
|
@ -123,7 +123,7 @@ func TestAnnotateNodes(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
annotated, invalid := reconciler.annotateNodes(context.Background(), []corev1.Node{tc.node})
|
||||
annotated, invalid := reconciler.annotateNodes(t.Context(), []corev1.Node{tc.node})
|
||||
if tc.wantAnnotated == nil {
|
||||
assert.Len(annotated, 0)
|
||||
assert.Len(invalid, 1)
|
||||
|
@ -226,7 +226,7 @@ func TestPairDonorsAndHeirs(t *testing.T) {
|
|||
},
|
||||
}
|
||||
nodeImage := updatev1alpha1.NodeVersion{}
|
||||
pairs := reconciler.pairDonorsAndHeirs(context.Background(), &nodeImage, []corev1.Node{tc.outdatedNode}, []mintNode{tc.mintNode})
|
||||
pairs := reconciler.pairDonorsAndHeirs(t.Context(), &nodeImage, []corev1.Node{tc.outdatedNode}, []mintNode{tc.mintNode})
|
||||
if tc.wantPair == nil {
|
||||
assert.Len(pairs, 0)
|
||||
return
|
||||
|
@ -315,7 +315,7 @@ func TestMatchDonorsAndHeirs(t *testing.T) {
|
|||
stubReaderClient: *newStubReaderClient(t, []runtime.Object{&tc.donor, &tc.heir}, nil, nil),
|
||||
},
|
||||
}
|
||||
pairs := reconciler.matchDonorsAndHeirs(context.Background(), nil, []corev1.Node{tc.donor}, []corev1.Node{tc.heir})
|
||||
pairs := reconciler.matchDonorsAndHeirs(t.Context(), nil, []corev1.Node{tc.donor}, []corev1.Node{tc.heir})
|
||||
if tc.wantPair == nil {
|
||||
assert.Len(pairs, 0)
|
||||
return
|
||||
|
@ -693,7 +693,7 @@ func TestCreateNewNodes(t *testing.T) {
|
|||
Scheme: getScheme(t),
|
||||
}
|
||||
newNodeConfig := newNodeConfig{desiredNodeImage, tc.outdatedNodes, tc.donors, tc.pendingNodes, tc.scalingGroupByID, tc.budget}
|
||||
err := reconciler.createNewNodes(context.Background(), newNodeConfig)
|
||||
err := reconciler.createNewNodes(t.Context(), newNodeConfig)
|
||||
require.NoError(err)
|
||||
assert.Equal(tc.wantCreateCalls, reconciler.nodeReplacer.(*stubNodeReplacerWriter).createCalls)
|
||||
})
|
||||
|
|
|
@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
|
@ -250,7 +249,7 @@ func TestFindObjectsForScalingGroup(t *testing.T) {
|
|||
}
|
||||
assert := assert.New(t)
|
||||
reconciler := NodeVersionReconciler{}
|
||||
requests := reconciler.findObjectsForScalingGroup(context.TODO(), &scalingGroup)
|
||||
requests := reconciler.findObjectsForScalingGroup(t.Context(), &scalingGroup)
|
||||
assert.ElementsMatch(wantRequests, requests)
|
||||
}
|
||||
|
||||
|
@ -284,7 +283,7 @@ func TestFindAllNodeVersions(t *testing.T) {
|
|||
reconciler := NodeVersionReconciler{
|
||||
Client: newStubReaderClient(t, []runtime.Object{tc.nodeVersion}, nil, tc.listNodeVersionsErr),
|
||||
}
|
||||
requests := reconciler.findAllNodeVersions(context.TODO(), nil)
|
||||
requests := reconciler.findAllNodeVersions(t.Context(), nil)
|
||||
assert.ElementsMatch(tc.wantRequests, requests)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ func TestFindObjectsForNode(t *testing.T) {
|
|||
reconciler := PendingNodeReconciler{
|
||||
Client: newStubReaderClient(t, []runtime.Object{tc.pendingNode}, nil, tc.listPendingNodesErr),
|
||||
}
|
||||
requests := reconciler.findObjectsForNode(context.TODO(), &corev1.Node{
|
||||
requests := reconciler.findObjectsForNode(t.Context(), &corev1.Node{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "pending-node",
|
||||
},
|
||||
|
@ -218,7 +218,7 @@ func TestReachedGoal(t *testing.T) {
|
|||
reconciler := PendingNodeReconciler{
|
||||
Client: newStubReaderClient(t, []runtime.Object{&tc.pendingNode}, tc.getPendingNodeErr, nil),
|
||||
}
|
||||
reachedGoal, err := reconciler.reachedGoal(context.Background(), tc.pendingNode, tc.nodeState)
|
||||
reachedGoal, err := reconciler.reachedGoal(t.Context(), tc.pendingNode, tc.nodeState)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue