File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -172,9 +172,9 @@ func TestGitGetter_shallowCloneWithTag(t *testing.T) {
172
172
dst := tempDir (t )
173
173
174
174
repo := testGitRepo (t , "upstream" )
175
- repo .commitFile ("upstream.txt" , "0" )
176
- repo .commitFile ("upstream.txt" , "1" )
175
+ repo .commitFile ("v1.0.txt" , "0" )
177
176
repo .git ("tag" , "v1.0" )
177
+ repo .commitFile ("v1.1.txt" , "1" )
178
178
179
179
// Specifiy a clone depth of 1 with a tag
180
180
q := repo .url .Query ()
@@ -198,6 +198,18 @@ func TestGitGetter_shallowCloneWithTag(t *testing.T) {
198
198
if out != "1" {
199
199
t .Fatalf ("expected rev-list count to be '1' but got %v" , out )
200
200
}
201
+
202
+ // Verify the v1.0 file exists
203
+ mainPath := filepath .Join (dst , "v1.0.txt" )
204
+ if _ , err := os .Stat (mainPath ); err != nil {
205
+ t .Fatalf ("err: %s" , err )
206
+ }
207
+
208
+ // Verify the v1.1 file does not exists
209
+ mainPath := filepath .Join (dst , "v1.1.txt" )
210
+ if _ , err := os .Stat (mainPath ); err == nil {
211
+ t .Fatalf ("expected v1.1 file to not exist" )
212
+ }
201
213
}
202
214
203
215
func TestGitGetter_branchUpdate (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments