mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-22 23:10:36 -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
|
@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
@ -101,7 +100,7 @@ func TestGetNodeImage(t *testing.T) {
|
|||
disk: tc.disk,
|
||||
},
|
||||
}
|
||||
gotImage, err := client.GetNodeImage(context.Background(), tc.providerID)
|
||||
gotImage, err := client.GetNodeImage(t.Context(), tc.providerID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -162,7 +161,7 @@ func TestGetScalingGroupID(t *testing.T) {
|
|||
instance: &instance,
|
||||
},
|
||||
}
|
||||
gotScalingGroupID, err := client.GetScalingGroupID(context.Background(), tc.providerID)
|
||||
gotScalingGroupID, err := client.GetScalingGroupID(t.Context(), tc.providerID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -221,7 +220,7 @@ func TestCreateNode(t *testing.T) {
|
|||
},
|
||||
prng: rand.New(rand.NewSource(int64(time.Now().Nanosecond()))),
|
||||
}
|
||||
instanceName, providerID, err := client.CreateNode(context.Background(), tc.scalingGroupID)
|
||||
instanceName, providerID, err := client.CreateNode(t.Context(), tc.scalingGroupID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -287,7 +286,7 @@ func TestDeleteNode(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
err := client.DeleteNode(context.Background(), tc.providerID)
|
||||
err := client.DeleteNode(t.Context(), tc.providerID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
|
@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
@ -108,7 +107,7 @@ func TestGetNodeState(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
nodeState, err := client.GetNodeState(context.Background(), tc.providerID)
|
||||
nodeState, err := client.GetNodeState(t.Context(), tc.providerID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
|
@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
|
@ -57,7 +56,7 @@ func TestCanonicalProjectID(t *testing.T) {
|
|||
getErr: tc.getProjectErr,
|
||||
},
|
||||
}
|
||||
gotID, err := client.canonicalProjectID(context.Background(), tc.projectID)
|
||||
gotID, err := client.canonicalProjectID(t.Context(), tc.projectID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
|
@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
|
@ -96,7 +95,7 @@ func TestGetScalingGroupImage(t *testing.T) {
|
|||
template: tc.instanceTemplate,
|
||||
},
|
||||
}
|
||||
gotImage, err := client.GetScalingGroupImage(context.Background(), tc.scalingGroupID)
|
||||
gotImage, err := client.GetScalingGroupImage(t.Context(), tc.scalingGroupID)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -281,7 +280,7 @@ func TestSetScalingGroupImage(t *testing.T) {
|
|||
template: tc.instanceTemplate,
|
||||
},
|
||||
}
|
||||
err := client.SetScalingGroupImage(context.Background(), tc.scalingGroupID, tc.imageURI)
|
||||
err := client.SetScalingGroupImage(t.Context(), tc.scalingGroupID, tc.imageURI)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -456,7 +455,7 @@ func TestListScalingGroups(t *testing.T) {
|
|||
getErr: tc.templateGetErr,
|
||||
},
|
||||
}
|
||||
gotGroups, err := client.ListScalingGroups(context.Background(), "uid")
|
||||
gotGroups, err := client.ListScalingGroups(t.Context(), "uid")
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue