store: make state (de)serialization internal
This hides the state hanlding in the store package. As before, it can be disabled by passing `nil` instead of the path to the state file. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
ad637b46f8
commit
68ade23fcc
4 changed files with 65 additions and 65 deletions
|
|
@ -153,13 +153,13 @@ func TestBasic(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, c := range cases {
|
||||
api := weldr.New(repo, packages, nil, store.New(nil, nil))
|
||||
api := weldr.New(repo, packages, nil, store.New(nil))
|
||||
testRoute(t, api, "GET", c.Path, ``, c.ExpectedStatus, c.ExpectedJSON)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBlueprints(t *testing.T) {
|
||||
api := weldr.New(repo, packages, nil, store.New(nil, nil))
|
||||
api := weldr.New(repo, packages, nil, store.New(nil))
|
||||
|
||||
testRoute(t, api, "POST", "/api/v0/blueprints/new",
|
||||
`{"name":"test","description":"Test","packages":[{"name":"httpd","version":"2.4.*"}],"version":"0.0.0"}`,
|
||||
|
|
@ -182,7 +182,7 @@ func TestBlueprints(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCompose(t *testing.T) {
|
||||
api := weldr.New(repo, packages, nil, store.New(nil, nil))
|
||||
api := weldr.New(repo, packages, nil, store.New(nil))
|
||||
|
||||
testRoute(t, api, "POST", "/api/v0/blueprints/new",
|
||||
`{"name":"test","description":"Test","packages":[{"name":"httpd","version":"2.4.*"}],"version":"0.0.0"}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue