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:
Daniel Weiße 2025-04-09 10:54:28 +02:00 committed by GitHub
parent a7f9561a3d
commit 4e5c213b4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 287 additions and 316 deletions

View file

@ -91,7 +91,7 @@ func TestGetNodeImage(t *testing.T) {
describeInstancesErr: tc.describeInstancesErr,
},
}
gotImage, err := client.GetNodeImage(context.Background(), tc.providerID)
gotImage, err := client.GetNodeImage(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return
@ -199,7 +199,7 @@ func TestGetScalingGroupID(t *testing.T) {
describeInstancesErr: tc.describeInstancesErr,
},
}
gotScalingID, err := client.GetScalingGroupID(context.Background(), tc.providerID)
gotScalingID, err := client.GetScalingGroupID(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return
@ -357,7 +357,7 @@ func TestCreateNode(t *testing.T) {
setDesiredCapacityErr: tc.setDesiredCapacityErr,
},
}
nodeName, providerID, err := client.CreateNode(context.Background(), tc.providerID)
nodeName, providerID, err := client.CreateNode(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return
@ -398,7 +398,7 @@ func TestDeleteNode(t *testing.T) {
terminateInstanceErr: tc.terminateInstanceErr,
},
}
err := client.DeleteNode(context.Background(), tc.providerID)
err := client.DeleteNode(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return

View file

@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
package client
import (
"context"
"errors"
"testing"
@ -161,7 +160,7 @@ func TestGetNodeState(t *testing.T) {
describeInstanceStatusErr: tc.describeInstanceStatusErr,
},
}
nodeState, err := client.GetNodeState(context.Background(), tc.providerID)
nodeState, err := client.GetNodeState(t.Context(), tc.providerID)
assert.Equal(tc.wantState, nodeState)
if tc.wantErr {
assert.Error(err)

View file

@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
package client
import (
"context"
"testing"
"github.com/aws/aws-sdk-go-v2/service/autoscaling"
@ -91,7 +90,7 @@ func TestGetScalingGroupImage(t *testing.T) {
},
},
}
scalingGroupImage, err := client.GetScalingGroupImage(context.Background(), tc.providerID)
scalingGroupImage, err := client.GetScalingGroupImage(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return
@ -216,7 +215,7 @@ func TestSetScalingGroupImage(t *testing.T) {
},
},
}
err := client.SetScalingGroupImage(context.Background(), tc.providerID, tc.imageURI)
err := client.SetScalingGroupImage(t.Context(), tc.providerID, tc.imageURI)
if tc.wantErr {
assert.Error(err)
return
@ -319,7 +318,7 @@ func TestListScalingGroups(t *testing.T) {
describeAutoScalingGroupsErr: tc.describeAutoScalingGroupsErr,
},
}
gotGroups, err := client.ListScalingGroups(context.Background(), tc.providerID)
gotGroups, err := client.ListScalingGroups(t.Context(), tc.providerID)
if tc.wantErr {
assert.Error(err)
return