mirror of
https://github.com/restic/restic.git
synced 2024-12-24 00:37:28 +00:00
rclone: Skip crash test when rclone is not found
This commit is contained in:
parent
01b9581453
commit
ea97ff1ba4
1 changed files with 6 additions and 0 deletions
|
@ -2,8 +2,10 @@ package rclone
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/restic/restic/internal/errors"
|
||||||
"github.com/restic/restic/internal/restic"
|
"github.com/restic/restic/internal/restic"
|
||||||
rtest "github.com/restic/restic/internal/test"
|
rtest "github.com/restic/restic/internal/test"
|
||||||
)
|
)
|
||||||
|
@ -16,6 +18,10 @@ func TestRcloneExit(t *testing.T) {
|
||||||
cfg := NewConfig()
|
cfg := NewConfig()
|
||||||
cfg.Remote = dir
|
cfg.Remote = dir
|
||||||
be, err := Open(cfg, nil)
|
be, err := Open(cfg, nil)
|
||||||
|
if e, ok := errors.Cause(err).(*exec.Error); ok && e.Err == exec.ErrNotFound {
|
||||||
|
t.Skipf("program %q not found", e.Name)
|
||||||
|
return
|
||||||
|
}
|
||||||
rtest.OK(t, err)
|
rtest.OK(t, err)
|
||||||
defer be.Close()
|
defer be.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue