containerd/server/server_test.go
Daniel Nephin 49af59bfca Validate that root and state paths are different.
Using the same path for both results in confusing errors when runtime.newBundle()
attempts to create the directories for the Task

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-10 12:32:51 -05:00

18 lines
352 B
Go

package server
import (
"testing"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)
func TestNewErrorsWithSamePathForRootAndState(t *testing.T) {
path := "/tmp/path/for/testing"
_, err := New(context.Background(), &Config{
Root: path,
State: path,
})
assert.EqualError(t, err, "root and state must be different paths")
}