5
5
"errors"
6
6
"github.com/cirruslabs/cirrus-cli/internal/testutil"
7
7
"github.com/cirruslabs/cirrus-cli/pkg/larker"
8
- "github.com/cirruslabs/cirrus-cli/pkg/larker/fs"
8
+ "github.com/cirruslabs/cirrus-cli/pkg/larker/fs/local "
9
9
"github.com/stretchr/testify/assert"
10
10
"github.com/stretchr/testify/require"
11
11
"io/ioutil"
@@ -34,7 +34,7 @@ func validateExpected(t *testing.T, testDir string) {
34
34
}
35
35
36
36
// Run the source code to produce a YAML configuration
37
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
37
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
38
38
configuration , err := lrk .Main (context .Background (), string (source ))
39
39
if err != nil {
40
40
t .Fatal (err )
@@ -59,7 +59,7 @@ func TestLoadFileSystemLocal(t *testing.T) {
59
59
}
60
60
61
61
// Run the source code
62
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
62
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
63
63
_ , err = lrk .Main (context .Background (), string (source ))
64
64
if err != nil {
65
65
t .Fatal (err )
@@ -81,7 +81,7 @@ func TestTimeout(t *testing.T) {
81
81
defer cancel ()
82
82
83
83
// Run the source code
84
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
84
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
85
85
_ , err = lrk .Main (ctx , string (source ))
86
86
assert .Error (t , err )
87
87
assert .True (t , errors .Is (err , context .DeadlineExceeded ))
@@ -98,7 +98,7 @@ func TestCycle(t *testing.T) {
98
98
}
99
99
100
100
// Run the source code
101
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
101
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
102
102
_ , err = lrk .Main (context .Background (), string (source ))
103
103
assert .Error (t , err )
104
104
assert .True (t , errors .Is (err , larker .ErrLoadFailed ))
@@ -118,7 +118,7 @@ func TestLoadGitHelpers(t *testing.T) {
118
118
}
119
119
120
120
// Run the source code
121
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
121
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
122
122
result , err := lrk .Main (context .Background (), string (source ))
123
123
if err != nil {
124
124
t .Fatal (err )
@@ -137,7 +137,7 @@ func TestLoadGitHelpers(t *testing.T) {
137
137
func TestLoadTypoStarVsStart (t * testing.T ) {
138
138
dir := testutil .TempDir (t )
139
139
140
- lrk := larker .New (larker .WithFileSystem (fs . NewLocalFileSystem (dir )))
140
+ lrk := larker .New (larker .WithFileSystem (local . New (dir )))
141
141
142
142
// No hint
143
143
_ , err := lrk .Main (context .Background (), "load(\" some/lib.star\" , \" symbol\" )\n " )
0 commit comments