]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/modfetch/codehost: skip tests that fail due to tag mismatches
authorBryan C. Mills <bcmills@google.com>
Fri, 5 May 2023 13:09:00 +0000 (09:09 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 5 May 2023 13:20:58 +0000 (13:20 +0000)
For #56881.

Change-Id: If9d8fa2942e4dd8da5e673631cdc277e0fe6c962
Reviewed-on: https://go-review.googlesource.com/c/go/+/492975
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/go/internal/modfetch/codehost/git_test.go

index 084167e4df6a7be8f1d6c090e017e66f5a3619b3..cb0f501b9afba22197be398c57360e66e38d87c6 100644 (file)
@@ -234,6 +234,9 @@ func TestLatest(t *testing.T) {
                                t.Fatal(err)
                        }
                        if !reflect.DeepEqual(info, tt.info) {
+                               if !reflect.DeepEqual(info.Tags, tt.info.Tags) {
+                                       testenv.SkipFlaky(t, 56881)
+                               }
                                t.Errorf("Latest: incorrect info\nhave %+v (origin %+v)\nwant %+v (origin %+v)", info, info.Origin, tt.info, tt.info.Origin)
                        }
                }
@@ -609,6 +612,9 @@ func TestStat(t *testing.T) {
                        }
                        info.Origin = nil // TestLatest and ../../../testdata/script/reuse_git.txt test Origin well enough
                        if !reflect.DeepEqual(info, tt.info) {
+                               if !reflect.DeepEqual(info.Tags, tt.info.Tags) {
+                                       testenv.SkipFlaky(t, 56881)
+                               }
                                t.Errorf("Stat: incorrect info\nhave %+v\nwant %+v", *info, *tt.info)
                        }
                }