Skip to content

Commit

Permalink
Fix lint (#55)
Browse files Browse the repository at this point in the history
I broke the build in a repo in which I'm the only contributer 🤦
  • Loading branch information
swgillespie authored Feb 15, 2024
1 parent 52e8847 commit 85bec6a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/provider/namespace_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func TestAccBasicNamespace(t *testing.T) {
t.Parallel()
name := fmt.Sprintf("%s-%s", "tf-basic-namespace", randomString(10))
name := fmt.Sprintf("%s-%s", "tf-basic-namespace", randomString())
config := func(name string, retention int) string {
return fmt.Sprintf(`
provider "temporalcloud" {
Expand Down Expand Up @@ -70,7 +70,7 @@ PEM

func TestAccBasicNamespaceWithCertFilters(t *testing.T) {
t.Parallel()
name := fmt.Sprintf("%s-%s", "tf-cert-filters", randomString(10))
name := fmt.Sprintf("%s-%s", "tf-cert-filters", randomString())
config := func(name string, retention int) string {
return fmt.Sprintf(`
provider "temporalcloud" {
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestAccNamespaceWithCodecServer(t *testing.T) {
)

t.Parallel()
name := fmt.Sprintf("%s-%s", "tf-codec-server", randomString(10))
name := fmt.Sprintf("%s-%s", "tf-codec-server", randomString())
tmpl := template.Must(template.New("config").Parse(`
provider "temporalcloud" {
Expand Down Expand Up @@ -260,8 +260,8 @@ PEM

func TestAccNamespaceRenameForcesReplacement(t *testing.T) {
t.Parallel()
oldName := fmt.Sprintf("%s-%s", "tf-rename-replace", randomString(10))
newName := fmt.Sprintf("%s-%s", "tf-rename-replace-new", randomString(10))
oldName := fmt.Sprintf("%s-%s", "tf-rename-replace", randomString())
newName := fmt.Sprintf("%s-%s", "tf-rename-replace-new", randomString())
config := func(name string) string {
return fmt.Sprintf(`
provider "temporalcloud" {
Expand Down Expand Up @@ -319,10 +319,10 @@ func newConnection(t *testing.T) cloudservicev1.CloudServiceClient {
return client
}

func randomString(length int) string {
func randomString() string {
r := rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
const charset = "abcdefghijklmnopqrstuvwxyz"
b := make([]byte, length)
b := make([]byte, 10)
for i := range b {
b[i] = charset[r.Intn(len(charset))]
}
Expand Down

0 comments on commit 85bec6a

Please sign in to comment.