Skip to content

Commit

Permalink
cmd/gitannex: When tags do not match, run e2e tests anyway
Browse files Browse the repository at this point in the history
Issue #7625
  • Loading branch information
dmcardle committed Apr 29, 2024
1 parent c2d0ef0 commit a5a9061
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/gitannex/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// checkRcloneBinaryVersion runs whichever rclone is on the PATH and checks
// whether it reports a version that matches the test's expectations. Returns
// nil when the version is the expected version, otherwise returns an error.
func checkRcloneBinaryVersion() error {
func checkRcloneBinaryVersion(t *testing.T) error {
// versionInfo is a subset of information produced by "core/version".
type versionInfo struct {
Version string
Expand All @@ -47,7 +47,8 @@ func checkRcloneBinaryVersion() error {
}
_, tagString := buildinfo.GetLinkingAndTags()
if parsed.GoTags != tagString {
return fmt.Errorf("expected tag string %q, but got %q", tagString, parsed.GoTags)
// TODO: Skip the test when tags do not match.
t.Logf("expected tag string %q, but got %q. Not skipping!", tagString, parsed.GoTags)
}
return nil
}
Expand Down Expand Up @@ -196,7 +197,7 @@ func skipE2eTestIfNecessary(t *testing.T) {
t.Skipf("GOOS %q is not supported.", runtime.GOOS)
}

if err := checkRcloneBinaryVersion(); err != nil {
if err := checkRcloneBinaryVersion(t); err != nil {
t.Skipf("Skipping due to rclone version: %s", err)
}

Expand Down

0 comments on commit a5a9061

Please sign in to comment.