forked from WasabiAiR/stow
-
Notifications
You must be signed in to change notification settings - Fork 10
/
location_test.go
54 lines (44 loc) · 1.07 KB
/
location_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package stow_test
import (
"net/url"
"github.com/flyteorg/stow"
)
func init() {
validatefn := func(config stow.Config) error {
return nil
}
makefn := func(config stow.Config) (stow.Location, error) {
return &testLocation{
config: config,
}, nil
}
kindfn := func(u *url.URL) bool {
return u.Scheme == testKind
}
stow.Register(testKind, makefn, kindfn, validatefn)
}
const testKind = "test"
type testLocation struct {
config stow.Config
}
func (l *testLocation) Close() error {
return nil
}
func (l *testLocation) CreateContainer(name string) (stow.Container, error) {
return nil, nil
}
func (l *testLocation) RemoveContainer(id string) error {
return nil
}
func (l *testLocation) Container(id string) (stow.Container, error) {
return nil, nil
}
func (l *testLocation) Containers(prefix string, cursor string, count int) ([]stow.Container, string, error) {
return nil, "", nil
}
func (l *testLocation) ItemByURL(u *url.URL) (stow.Item, error) {
return nil, nil
}
func (l *testLocation) ContainerByURL(u *url.URL) (stow.Container, error) {
return nil, nil
}