mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
22 lines
375 B
Go
22 lines
375 B
Go
![]() |
package sandbox
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestSandboxCreate(t *testing.T) {
|
||
|
key, err := newKey(t)
|
||
|
if err != nil {
|
||
|
t.Fatalf("Failed to obtain a key: %v", err)
|
||
|
}
|
||
|
|
||
|
s, err := NewSandbox(key)
|
||
|
if err != nil {
|
||
|
t.Fatalf("Failed to create a new sandbox: %v", err)
|
||
|
}
|
||
|
|
||
|
if s.Key() != key {
|
||
|
t.Fatalf("s.Key() returned %s. Expected %s", s.Key(), key)
|
||
|
}
|
||
|
|
||
|
verifySandbox(t, s)
|
||
|
}
|