@@ -34,12 +34,14 @@ var foldersUsingVCRv4 = []string{
3434
3535func folderUsesVCRv4 (fullFolderPath string ) bool {
3636 fullPathSplit := strings .Split (fullFolderPath , "/" )
37+
3738 folder := fullPathSplit [len (fullPathSplit )- 1 ]
3839 for _ , migratedFolder := range foldersUsingVCRv4 {
3940 if migratedFolder == folder {
4041 return true
4142 }
4243 }
44+
4345 return false
4446}
4547
@@ -74,14 +76,17 @@ func NewTestTools(t *testing.T) *TestTools {
7476 }
7577
7678 // Create an HTTP client with recording capabilities
77- var httpClient * http.Client
78- var cleanup func ()
79+ var (
80+ httpClient * http.Client
81+ cleanup func ()
82+ )
7983
8084 if folderUsesVCRv4 (folder ) {
8185 httpClient , cleanup , err = NewRecordedClient (t , folder , * UpdateCassettes )
8286 } else {
8387 httpClient , cleanup , err = getHTTPRecoder (t , folder , * UpdateCassettes )
8488 }
89+
8590 require .NoError (t , err )
8691
8792 // Create meta that will be passed in the provider config
@@ -93,11 +98,11 @@ func NewTestTools(t *testing.T) *TestTools {
9398 require .NoError (t , err )
9499
95100 if ! * UpdateCassettes {
96- // If no recording is happening, the delay to retry to interactions should be 0
101+ // If no recording is happening, the delay to retry interactions should be 0
97102 tmp := 0 * time .Second
98103 transport .DefaultWaitRetryInterval = & tmp
99104 } else if os .Getenv (env .RetryDelay ) != "" {
100- // Overriding the delay interval is helpful to reduce the amount of requests performed while waiting for a ressource to be available
105+ // Overriding the delay interval is helpful to reduce the amount of requests performed while waiting for a resource to be available
101106 tmp , err := time .ParseDuration (os .Getenv (env .RetryDelay ))
102107 if err != nil {
103108 t .Fatal (err )
0 commit comments