File tree Expand file tree Collapse file tree 2 files changed +0
-15
lines changed
internal/pkg/services/ske/utils Expand file tree Collapse file tree 2 files changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ const (
3232)
3333
3434type 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}
Original file line number Diff line number Diff 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
6766type 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-
8773func (m *skeClientMocked) ListClustersExecute(_ context.Context, _ string) (*ske.ListClustersResponse, error) {
8874 if m.listClustersFails {
8975 return nil, fmt.Errorf("could not list clusters")
You can’t perform that action at this time.
0 commit comments