Skip to content

Commit deb5103

Browse files
stackit-pipelineFyuselbahkauv70renovate-bot
authored
fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/ske to v0.21.1 (#573)
* Remove GetServiceStatusExecute for ske service Function was deprecated on 2024-04-16 and was now removed. Signed-off-by: Alexander Dahmen <[email protected]> * Adjust ske datatypes Signed-off-by: Alexander Dahmen <[email protected]> * chore: fix testcase setup * fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/ske to v0.21.1 --------- Signed-off-by: Alexander Dahmen <[email protected]> Co-authored-by: Alexander Dahmen <[email protected]> Co-authored-by: Rüdiger Schmitz <[email protected]> Co-authored-by: Renovate Bot <[email protected]>
1 parent ec2aa5e commit deb5103

File tree

7 files changed

+12
-24
lines changed

7 files changed

+12
-24
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ require (
2828
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.5.0
2929
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.5.0
3030
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.4.0
31-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.0
31+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.1
3232
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v0.9.0
3333
github.com/zalando/go-keyring v0.2.6
3434
golang.org/x/mod v0.22.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.5.0 h1:yf9BxAZ
157157
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.5.0/go.mod h1:Wpqj80yGruCNYGr2yxqhRaLLj4gPSkhJqZyWRXUh/QU=
158158
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.4.0 h1:K5fVTcJxjOVwJBa3kiWRsYNAq+I3jAYdU1U+f6no5lE=
159159
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.4.0/go.mod h1:zyg0hpiNdZLRbelkJb2KDf9OHQKLqqcTpePQ1qHL5dE=
160-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.0 h1:Pew85wQJe2e9K8ZRzxeFSimI29aqUZwOT/Ty0N1K+c0=
161-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.0/go.mod h1:iZyh3DMi2fUZxAIseykjKfDo2wf2FIDwpF43I22b8uk=
160+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.1 h1:oO+wCobC4OfH+vpfJQEnCUQuKVILRj5mQojBbzWgzDA=
161+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.21.1/go.mod h1:iZyh3DMi2fUZxAIseykjKfDo2wf2FIDwpF43I22b8uk=
162162
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v0.9.0 h1:OYWT7B63isBPyVuPxd3yobvky7/nhcXQxaBgPki5nR4=
163163
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v0.9.0/go.mod h1:vrl+OVJkjjupkvfkqY2T3HAB6x2x0S6zDhdFB5BWEnU=
164164
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

internal/cmd/ske/cluster/create/create_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package create
33
import (
44
"context"
55
"testing"
6+
"time"
67

78
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
89
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
@@ -60,8 +61,8 @@ var testPayload = &ske.CreateOrUpdateClusterPayload{
6061
MachineImageVersion: utils.Ptr(true),
6162
},
6263
TimeWindow: &ske.TimeWindow{
63-
End: utils.Ptr("0000-01-01T05:00:00+02:00"),
64-
Start: utils.Ptr("0000-01-01T03:00:00+02:00"),
64+
End: utils.Ptr(time.Date(0, 1, 1, 5, 0, 0, 0, time.FixedZone("test-zone", 2*60*60))),
65+
Start: utils.Ptr(time.Date(0, 1, 1, 3, 0, 0, 0, time.FixedZone("test-zone", 2*60*60))),
6566
},
6667
},
6768
}

internal/cmd/ske/cluster/update/update_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package update
33
import (
44
"context"
55
"testing"
6+
"time"
67

78
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
89
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
@@ -60,8 +61,8 @@ var testPayload = ske.CreateOrUpdateClusterPayload{
6061
MachineImageVersion: utils.Ptr(true),
6162
},
6263
TimeWindow: &ske.TimeWindow{
63-
End: utils.Ptr("0000-01-01T05:00:00+02:00"),
64-
Start: utils.Ptr("0000-01-01T03:00:00+02:00"),
64+
End: utils.Ptr(time.Date(0, 1, 1, 5, 0, 0, 0, time.FixedZone("test-zone", 2*60*60))),
65+
Start: utils.Ptr(time.Date(0, 1, 1, 3, 0, 0, 0, time.FixedZone("test-zone", 2*60*60))),
6566
},
6667
},
6768
}

internal/cmd/ske/options/options.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"fmt"
77
"strings"
8+
"time"
89

910
"github.com/goccy/go-yaml"
1011
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
@@ -238,7 +239,7 @@ func buildKubernetesVersionsTable(resp *ske.ProviderOptions) (tables.Table, erro
238239
}
239240
expirationDate := ""
240241
if v.ExpirationDate != nil {
241-
expirationDate = *v.ExpirationDate
242+
expirationDate = v.ExpirationDate.Format(time.RFC3339)
242243
}
243244
table.AddRow(*v.Version, *v.State, expirationDate, string(featureGate))
244245
}
@@ -265,7 +266,7 @@ func buildMachineImagesTable(resp *ske.ProviderOptions) tables.Table {
265266

266267
expirationDate := "-"
267268
if version.ExpirationDate != nil {
268-
expirationDate = *version.ExpirationDate
269+
expirationDate = version.ExpirationDate.Format(time.RFC3339)
269270
}
270271
table.AddRow(*image.Name, *version.Version, *version.State, expirationDate, criNamesString)
271272
}

internal/pkg/services/ske/utils/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const (
3232
)
3333

3434
type SKEClient interface {
35-
GetServiceStatusExecute(ctx context.Context, projectId string) (*ske.ProjectResponse, error)
3635
ListClustersExecute(ctx context.Context, projectId string) (*ske.ListClustersResponse, error)
3736
ListProviderOptionsExecute(ctx context.Context) (*ske.ProviderOptions, error)
3837
}

internal/pkg/services/ske/utils/utils_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212

1313
"github.com/google/go-cmp/cmp"
1414
"github.com/google/uuid"
15-
"github.com/stackitcloud/stackit-sdk-go/core/oapierror"
1615
"github.com/stackitcloud/stackit-sdk-go/services/ske"
1716
)
1817

@@ -65,25 +64,12 @@ users:
6564
)
6665

6766
type skeClientMocked struct {
68-
serviceDisabled bool
69-
getServiceStatusFails bool
70-
getServiceStatusResp *ske.ProjectResponse
7167
listClustersFails bool
7268
listClustersResp *ske.ListClustersResponse
7369
listProviderOptionsFails bool
7470
listProviderOptionsResp *ske.ProviderOptions
7571
}
7672

77-
func (m *skeClientMocked) GetServiceStatusExecute(_ context.Context, _ string) (*ske.ProjectResponse, error) {
78-
if m.getServiceStatusFails {
79-
return nil, fmt.Errorf("could not get service status")
80-
}
81-
if m.serviceDisabled {
82-
return nil, &oapierror.GenericOpenAPIError{StatusCode: 404}
83-
}
84-
return m.getServiceStatusResp, nil
85-
}
86-
8773
func (m *skeClientMocked) ListClustersExecute(_ context.Context, _ string) (*ske.ListClustersResponse, error) {
8874
if m.listClustersFails {
8975
return nil, fmt.Errorf("could not list clusters")

0 commit comments

Comments
 (0)