Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop the uuid dependency #773

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/Pallinder/go-randomdata v1.2.0
github.com/blang/semver/v4 v4.0.0
github.com/cloudfoundry/cloud-service-broker/v2 v2.0.2
github.com/google/uuid v1.6.0
github.com/hashicorp/terraform-json v0.22.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/onsi/ginkgo/v2 v2.19.0
Expand Down Expand Up @@ -59,6 +58,7 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"os"

"csbbrokerpakazure/acceptance-tests/helpers/random"
"csbbrokerpakazure/providers/terraform-provider-csbmssqldbrunfailover/csbmssqldbrunfailover"
"csbbrokerpakazure/providers/terraform-provider-csbmssqldbrunfailover/testhelpers"

"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
Expand Down Expand Up @@ -45,13 +45,13 @@ var _ = Describe("resource_run_failover resource", Ordered, Label("acceptance"),
var err error

config = testhelpers.FailoverConfig{
ResourceGroupName: fmt.Sprintf("resourcegroupname-%s", uuid.NewString()),
ServerName: fmt.Sprintf("servername-%s", uuid.NewString()),
ResourceGroupName: random.Name(random.WithPrefix("resourcegroup")),
ServerName: random.Name(random.WithPrefix("servername")),
MainLocation: "eastus",
PartnerServerLocation: "eastus2",
PartnerServerName: fmt.Sprintf("partnerservername-%s", uuid.NewString()),
PartnerServerName: random.Name(random.WithPrefix("partnerservername")),
SubscriptionID: azureSubscriptionID,
FailoverGroupName: fmt.Sprintf("failovergroupname-%s", uuid.NewString()),
FailoverGroupName: random.Name(random.WithPrefix("failovergroupname")),
}

failoverData, err = testhelpers.CreateFailoverGroup(config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package testhelpers

import (
"context"
"fmt"

"csbbrokerpakazure/acceptance-tests/helpers/random"

"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql"
"github.com/google/uuid"
)

type FailoverData struct {
Expand Down Expand Up @@ -92,8 +92,8 @@ func createServer(ctx context.Context, cred azcore.TokenCredential, resourceGrou
armsql.Server{
Location: to.Ptr(location),
Properties: &armsql.ServerProperties{
AdministratorLogin: to.Ptr(fmt.Sprintf("dummylogin-%s", uuid.NewString())),
AdministratorLoginPassword: to.Ptr(fmt.Sprintf("dummyPassword-%s", uuid.NewString())),
AdministratorLogin: to.Ptr(random.Name(random.WithPrefix("dummy-login"))),
AdministratorLoginPassword: to.Ptr(random.Hexadecimal()),
},
},
nil,
Expand Down
Loading