mirror of
https://github.com/restic/restic.git
synced 2026-06-27 11:04:17 +00:00
skip key decryption in tests
This commit is contained in:
@@ -2,6 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
@@ -193,3 +194,12 @@ func TestCheckRepo(t testing.TB, repo *Repository) {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestInjectKey(t testing.TB, keyID restic.ID, key string) {
|
||||
var k crypto.Key
|
||||
err := json.Unmarshal([]byte(key), &k)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
testKeyInjection.Store(keyID, &k)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user