libct: remove Factory interface

The only implementation is LinuxFactory, let's use this directly.

Move the piece of documentation about Create from removed factory.go to
the factory_linux.go.

The LinuxFactory is to be removed later.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-02-10 19:13:17 -08:00
parent 71bc308b7f
commit a78c9a0184
3 changed files with 17 additions and 45 deletions

View File

@@ -21,16 +21,8 @@ func TestFactoryNew(t *testing.T) {
if factory == nil {
t.Fatal("factory should not be nil")
}
lfactory, ok := factory.(*LinuxFactory)
if !ok {
t.Fatal("expected linux factory returned on linux based systems")
}
if lfactory.Root != root {
t.Fatalf("expected factory root to be %q but received %q", root, lfactory.Root)
}
if factory.Type() != "libcontainer" {
t.Fatalf("unexpected factory type: %q, expected %q", factory.Type(), "libcontainer")
if factory.Root != root {
t.Fatalf("expected factory root to be %q but received %q", root, factory.Root)
}
}