@@ -2,7 +2,6 @@ package test_test
2
2
3
3
import (
4
4
"context"
5
- "os"
6
5
"path/filepath"
7
6
"testing"
8
7
@@ -15,14 +14,27 @@ import (
15
14
"github.com/stretchr/testify/require"
16
15
)
17
16
18
- func TestScaffoldGitRepo (t * testing.T ) {
17
+ func TestCatalogGitRepoUpdate (t * testing.T ) {
19
18
t .Parallel ()
20
19
21
20
ctx := context .Background ()
22
21
23
- tempDir , err := os .MkdirTemp ("" , "catalog-*" )
22
+ tempDir := t .TempDir ()
23
+
24
+ _ , err := module .NewRepo (ctx , log .New (), "github.com/gruntwork-io/terraform-fake-modules.git" , tempDir )
24
25
require .NoError (t , err )
25
26
27
+ _ , err = module .NewRepo (ctx , log .New (), "github.com/gruntwork-io/terraform-fake-modules.git" , tempDir )
28
+ require .NoError (t , err )
29
+ }
30
+
31
+ func TestScaffoldGitRepo (t * testing.T ) {
32
+ t .Parallel ()
33
+
34
+ ctx := context .Background ()
35
+
36
+ tempDir := t .TempDir ()
37
+
26
38
repo , err := module .NewRepo (ctx , log .New (), "github.com/gruntwork-io/terraform-fake-modules.git" , tempDir )
27
39
require .NoError (t , err )
28
40
@@ -36,8 +48,7 @@ func TestScaffoldGitModule(t *testing.T) {
36
48
37
49
ctx := context .Background ()
38
50
39
- tempDir , err := os .MkdirTemp ("" , "catalog-*" )
40
- require .NoError (t , err )
51
+ tempDir := t .TempDir ()
41
52
42
53
repo , err := module .NewRepo (ctx , log .New (), "https://github.com/gruntwork-io/terraform-fake-modules.git" , tempDir )
43
54
require .NoError (t , err )
@@ -75,8 +86,7 @@ func TestScaffoldGitModuleHttps(t *testing.T) {
75
86
76
87
ctx := context .Background ()
77
88
78
- tempDir , err := os .MkdirTemp ("" , "catalog-*" )
79
- require .NoError (t , err )
89
+ tempDir := t .TempDir ()
80
90
81
91
repo , err := module .NewRepo (ctx , log .New (), "https://github.com/gruntwork-io/terraform-fake-modules" , tempDir )
82
92
require .NoError (t , err )
0 commit comments