1
0
mirror of https://github.com/ssh-vault/ssh-vault.git synced 2025-07-29 18:01:12 +03:00

add tests for getkey Schlosser

This commit is contained in:
nbari
2016-10-22 23:02:10 +02:00
parent f1a70ec27e
commit 15a8dbcc3b
5 changed files with 86 additions and 4 deletions

View File

@ -25,7 +25,7 @@ func Cache() *cache {
}
// Get return ssh-key
func (c *cache) Get(u string, k int) (string, error) {
func (c *cache) Get(s Schlosser, u string, k int) (string, error) {
var (
uKey string
hash string
@ -37,7 +37,7 @@ func (c *cache) Get(u string, k int) (string, error) {
uKey = fmt.Sprintf("%s/%s.key-%d", c.dir, hash, k)
}
if !c.IsFile(uKey) {
keys, err := GetKey(u)
keys, err := s.GetKey(u)
if err != nil {
return "", err
}