forked from TrueCloudLab/restic
rest: Add test for external server
This commit is contained in:
parent
67da240068
commit
2130897ce0
1 changed files with 19 additions and 0 deletions
|
@ -121,6 +121,25 @@ func TestBackendREST(t *testing.T) {
|
|||
newTestSuite(ctx, t, serverURL, false).RunTests(t)
|
||||
}
|
||||
|
||||
func TestBackendRESTExternalServer(t *testing.T) {
|
||||
repostr := os.Getenv("RESTIC_TEST_REST_REPOSITORY")
|
||||
if repostr == "" {
|
||||
t.Skipf("environment variable %v not set", "RESTIC_TEST_REST_REPOSITORY")
|
||||
}
|
||||
|
||||
cfg, err := rest.ParseConfig(repostr)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
c := cfg.(rest.Config)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
newTestSuite(ctx, t, c.URL, true).RunTests(t)
|
||||
}
|
||||
|
||||
func BenchmarkBackendREST(t *testing.B) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
|
Loading…
Reference in a new issue