diff --git a/cmd/gitannex/e2e_test.go b/cmd/gitannex/e2e_test.go index eae2b8e94..a67e9b259 100644 --- a/cmd/gitannex/e2e_test.go +++ b/cmd/gitannex/e2e_test.go @@ -31,9 +31,7 @@ func checkRcloneBinaryVersion(t *testing.T) error { cmd := exec.Command("rclone", "rc", "--loopback", "core/version") stdout, err := cmd.Output() - if err != nil { - return fmt.Errorf("failed to get rclone version: %w", err) - } + require.NoError(t, err) var parsed versionInfo if err := json.Unmarshal(stdout, &parsed); err != nil { diff --git a/cmd/gitannex/gitannex_test.go b/cmd/gitannex/gitannex_test.go index 6d60e1db1..9f3f08682 100644 --- a/cmd/gitannex/gitannex_test.go +++ b/cmd/gitannex/gitannex_test.go @@ -456,10 +456,7 @@ var fstestTestCases = []testCase{ h.requireWriteLine("EXTENSIONS INFO") // Advertise that we support the INFO extension h.requireReadLineExact("EXTENSIONS") - if !h.server.extensionInfo { - t.Errorf("expected INFO extension to be enabled") - return - } + require.True(t, h.server.extensionInfo) h.requireWriteLine("PREPARE") h.requireReadLineExact("GETCONFIG rcloneremotename") @@ -484,10 +481,7 @@ var fstestTestCases = []testCase{ h.requireWriteLine("EXTENSIONS INFO") // Advertise that we support the INFO extension h.requireReadLineExact("EXTENSIONS") - if !h.server.extensionInfo { - t.Errorf("expected INFO extension to be enabled") - return - } + require.True(t, h.server.extensionInfo) h.requireWriteLine("PREPARE") h.requireReadLineExact("GETCONFIG rcloneremotename") @@ -516,10 +510,7 @@ var fstestTestCases = []testCase{ h.requireWriteLine("EXTENSIONS INFO") // Advertise that we support the INFO extension h.requireReadLineExact("EXTENSIONS") - if !h.server.extensionInfo { - t.Errorf("expected INFO extension to be enabled") - return - } + require.True(t, h.server.extensionInfo) h.requireWriteLine("PREPARE") h.requireReadLineExact("GETCONFIG rcloneremotename") @@ -552,10 +543,7 @@ var fstestTestCases = []testCase{ h.requireWriteLine("EXTENSIONS INFO") // Advertise that we support the INFO extension h.requireReadLineExact("EXTENSIONS") - if !h.server.extensionInfo { - t.Errorf("expected INFO extension to be enabled") - return - } + require.True(t, h.server.extensionInfo) h.requireWriteLine("PREPARE") h.requireReadLineExact("GETCONFIG rcloneremotename") @@ -584,10 +572,7 @@ var fstestTestCases = []testCase{ h.requireWriteLine("EXTENSIONS INFO") // Advertise that we support the INFO extension h.requireReadLineExact("EXTENSIONS") - if !h.server.extensionInfo { - t.Errorf("expected INFO extension to be enabled") - return - } + require.True(t, h.server.extensionInfo) h.requireWriteLine("PREPARE") h.requireReadLineExact("GETCONFIG rcloneremotename")