|
@@ -18,6 +18,15 @@ func TestNamespacesContains(t *testing.T) {
|
|
if !ns.Contains("NEWPID") {
|
|
if !ns.Contains("NEWPID") {
|
|
t.Fatal("namespaces should contain NEWPID but does not")
|
|
t.Fatal("namespaces should contain NEWPID but does not")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ withNil := Namespaces{
|
|
|
|
+ GetNamespace("UNDEFINED"), // this element will be nil
|
|
|
|
+ GetNamespace("NEWPID"),
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if !withNil.Contains("NEWPID") {
|
|
|
|
+ t.Fatal("namespaces should contain NEWPID but does not")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
func TestCapabilitiesContains(t *testing.T) {
|
|
func TestCapabilitiesContains(t *testing.T) {
|