Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

cmd/gitannex: When tags do not match, run e2e tests anyway

Dan McArdlef26fc8f07c9d
diff --git a/cmd/gitannex/e2e_test.go b/cmd/gitannex/e2e_test.go
index bae3973d5..bff6ed890 100644
--- a/cmd/gitannex/e2e_test.go
+++ b/cmd/gitannex/e2e_test.go
@@ -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
@@ -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
}
@@ -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)
}