backend/local: fix panic in tests
update the function names in testDelegateBackend to match what was being called in TestLocal_multiStateBackend (matching the test behavior in master)
This commit is contained in:
parent
804da4be57
commit
fbe959ae6e
|
@ -182,7 +182,7 @@ var errTestDelegateState = errors.New("State called")
|
||||||
var errTestDelegateStates = errors.New("States called")
|
var errTestDelegateStates = errors.New("States called")
|
||||||
var errTestDelegateDeleteState = errors.New("Delete called")
|
var errTestDelegateDeleteState = errors.New("Delete called")
|
||||||
|
|
||||||
func (b *testDelegateBackend) State(name string) (statemgr.Full, error) {
|
func (b *testDelegateBackend) StateMgr(name string) (statemgr.Full, error) {
|
||||||
if b.stateErr {
|
if b.stateErr {
|
||||||
return nil, errTestDelegateState
|
return nil, errTestDelegateState
|
||||||
}
|
}
|
||||||
|
@ -190,14 +190,14 @@ func (b *testDelegateBackend) State(name string) (statemgr.Full, error) {
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *testDelegateBackend) States() ([]string, error) {
|
func (b *testDelegateBackend) Workspaces() ([]string, error) {
|
||||||
if b.statesErr {
|
if b.statesErr {
|
||||||
return nil, errTestDelegateStates
|
return nil, errTestDelegateStates
|
||||||
}
|
}
|
||||||
return []string{"default"}, nil
|
return []string{"default"}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *testDelegateBackend) DeleteState(name string) error {
|
func (b *testDelegateBackend) DeleteWorkspace(name string) error {
|
||||||
if b.deleteErr {
|
if b.deleteErr {
|
||||||
return errTestDelegateDeleteState
|
return errTestDelegateDeleteState
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue