mirror of
https://github.com/rclone/rclone
synced 2024-12-22 13:03:02 +01:00
cmd/gitannex: Simplify verbose failures in tests
This commit is contained in:
parent
b051514a4b
commit
cecd35b0ef
@ -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 {
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user