return 1;
}
- lua_pushboolean(L, !!(c->attach_run_wait(c, NULL, argv[0], (const char**)argv)));
+ lua_pushboolean(L, !(c->attach_run_wait(c, NULL, argv[0], (const char**)argv)));
return 1;
}
end
end
log(0, "%-20s %s", "Creating rootfs using:", optarg["t"])
- container:create(optarg["t"])
+ assert(container:create(optarg["t"]) == true)
assert(container:defined() == true)
assert(container:name() == optarg["n"])
end
end
end
+function test_container_attach()
+ log(0, "Test attach...")
+ assert(container:running() == true)
+ assert(container:attach("/bin/ps") == true)
+end
+
function test_container_cgroup()
log(0, "Test get/set cgroup items...")
test_container_start()
test_container_started()
+test_container_attach()
test_container_cgroup()
test_container_cmd()