Files
runc/utils/utils_test.go
T
Michael Crosby 3f2333b667 Add integration test pkg
This integration pkg adds a framework for writing integration tests
aginst the libcontainer APIs

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-17 23:25:30 +00:00

16 lines
298 B
Go

package utils
import "testing"
func TestGenerateName(t *testing.T) {
name, err := GenerateRandomName("veth", 5)
if err != nil {
t.Fatal(err)
}
expected := 5 + len("veth")
if len(name) != 5+len("veth") {
t.Fatalf("expected name to be %d chars but received %d", expected, len(name))
}
}