Skip to content

Commit

Permalink
Remove random bits
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored and tombuildsstuff committed May 19, 2020
1 parent 27a6363 commit c597900
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions backend/remote-state/azure/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package azure
import (
"context"
"fmt"
"github.com/hashicorp/terraform/helper/acctest"
"log"
"os"
"strconv"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -130,13 +128,8 @@ type resourceNames struct {
}

func testResourceNames(rString string, keyName string) resourceNames {
// Add a date to the resource group for better tracking
timeStr := strings.Replace(time.Now().Local().Format("060102150405.00"), ".", "", 1)
postfix := acctest.RandStringFromCharSet(4, "0123456789")
i, _ := strconv.Atoi(timeStr + postfix)

return resourceNames{
resourceGroup: fmt.Sprintf("acctestRG-backend-%d-%s", i, rString),
resourceGroup: fmt.Sprintf("acctestRG-backend-%s-%s", strings.Replace(time.Now().Local().Format("060102150405.00"), ".", "", 1), rString),
location: os.Getenv("ARM_LOCATION"),
storageAccountName: fmt.Sprintf("acctestsa%s", rString),
storageContainerName: "acctestcont",
Expand Down

0 comments on commit c597900

Please sign in to comment.