feat(oonirun): add support for OONIRun v2 links (#844)
This diff adds support for OONIRun v2 links. Part of https://github.com/ooni/probe/issues/2184.
This commit is contained in:
parent
ebb78c2848
commit
9a0153a349
11 changed files with 644 additions and 22 deletions
20
internal/model/mocks/keyvaluestore.go
Normal file
20
internal/model/mocks/keyvaluestore.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package mocks
|
||||
|
||||
import "github.com/ooni/probe-cli/v3/internal/model"
|
||||
|
||||
// KeyValueStore allows mocking model.KeyValueStore.
|
||||
type KeyValueStore struct {
|
||||
MockGet func(key string) (value []byte, err error)
|
||||
|
||||
MockSet func(key string, value []byte) (err error)
|
||||
}
|
||||
|
||||
var _ model.KeyValueStore = &KeyValueStore{}
|
||||
|
||||
func (kvs *KeyValueStore) Get(key string) (value []byte, err error) {
|
||||
return kvs.MockGet(key)
|
||||
}
|
||||
|
||||
func (kvs *KeyValueStore) Set(key string, value []byte) (err error) {
|
||||
return kvs.MockSet(key, value)
|
||||
}
|
||||
Loading…
Reference in a new issue