fix: fix linter errors
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 17s
CI Workflow / Prepare GO cache (pull_request) Successful in 2m10s
CI Workflow / CI run build and linting (pull_request) Successful in 7m10s
CI Workflow / Code coverage report (pull_request) Successful in 4s
CI Workflow / CI run tests (pull_request) Failing after 9m13s
CI Workflow / Test readiness for publishing provider (pull_request) Successful in 16m53s
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 17s
CI Workflow / Prepare GO cache (pull_request) Successful in 2m10s
CI Workflow / CI run build and linting (pull_request) Successful in 7m10s
CI Workflow / Code coverage report (pull_request) Successful in 4s
CI Workflow / CI run tests (pull_request) Failing after 9m13s
CI Workflow / Test readiness for publishing provider (pull_request) Successful in 16m53s
This commit is contained in:
parent
ab9ff41b24
commit
c8ea125bac
45 changed files with 1266 additions and 139 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
"tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/utils"
|
||||
|
||||
"github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3beta1api"
|
||||
|
||||
sqlserverflexbetaGen "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexbeta/flavor/datasources_gen"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ func getFlavorsByFilter(
|
|||
}
|
||||
|
||||
// If the API returns no flavors, we have reached the end of the list.
|
||||
if res.Flavors == nil || len(res.Flavors) == 0 {
|
||||
if len(res.Flavors) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sqlserverFlexBetaFlavor
|
||||
|
||||
//import (
|
||||
// import (
|
||||
// "context"
|
||||
// "testing"
|
||||
//
|
||||
|
|
@ -9,28 +9,28 @@ package sqlserverFlexBetaFlavor
|
|||
// "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3beta1api"
|
||||
//)
|
||||
//
|
||||
//type mockRequest struct {
|
||||
// type mockRequest struct {
|
||||
// executeFunc func() (*v3beta1api.GetFlavorsResponse, error)
|
||||
//}
|
||||
//
|
||||
//func (m *mockRequest) Page(_ int64) v3beta1api.ApiGetFlavorsRequestRequest { return m }
|
||||
//func (m *mockRequest) Size(_ int64) v3beta1api.ApiGetFlavorsRequestRequest { return m }
|
||||
//func (m *mockRequest) Sort(_ v3beta1api.FlavorSort) v3beta1api.ApiGetFlavorsRequestRequest {
|
||||
// func (m *mockRequest) Page(_ int64) v3beta1api.ApiGetFlavorsRequestRequest { return m }
|
||||
// func (m *mockRequest) Size(_ int64) v3beta1api.ApiGetFlavorsRequestRequest { return m }
|
||||
// func (m *mockRequest) Sort(_ v3beta1api.FlavorSort) v3beta1api.ApiGetFlavorsRequestRequest {
|
||||
// return m
|
||||
//}
|
||||
//func (m *mockRequest) Execute() (*v3beta1api.GetFlavorsResponse, error) {
|
||||
// func (m *mockRequest) Execute() (*v3beta1api.GetFlavorsResponse, error) {
|
||||
// return m.executeFunc()
|
||||
//}
|
||||
//
|
||||
//type mockFlavorsClient struct {
|
||||
// type mockFlavorsClient struct {
|
||||
// executeRequest func() v3beta1api.ApiGetFlavorsRequestRequest
|
||||
//}
|
||||
//
|
||||
//func (m *mockFlavorsClient) GetFlavorsRequest(_ context.Context, _, _ string) v3beta1api.ApiGetFlavorsRequestRequest {
|
||||
// func (m *mockFlavorsClient) GetFlavorsRequest(_ context.Context, _, _ string) v3beta1api.ApiGetFlavorsRequestRequest {
|
||||
// return m.executeRequest()
|
||||
//}
|
||||
//
|
||||
//var mockResp = func(page int64) (*v3beta1api.GetFlavorsResponse, error) {
|
||||
// var mockResp = func(page int64) (*v3beta1api.GetFlavorsResponse, error) {
|
||||
// if page == 1 {
|
||||
// return &v3beta1api.GetFlavorsResponse{
|
||||
// Flavors: &[]v3beta1api.ListFlavors{
|
||||
|
|
@ -52,7 +52,7 @@ package sqlserverFlexBetaFlavor
|
|||
// }, nil
|
||||
//}
|
||||
//
|
||||
//func TestGetFlavorsByFilter(t *testing.T) {
|
||||
// func TestGetFlavorsByFilter(t *testing.T) {
|
||||
// tests := []struct {
|
||||
// description string
|
||||
// projectId string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue