[lxc-devel] [lxd/master] lxc-to-lxd: Fix rootfs tests
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Thu Aug 9 09:08:09 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 355 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180809/90b90249/attachment.bin>
-------------- next part --------------
From d5e99058c559144d7b0484ba589954515bfb4c3f Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Thu, 9 Aug 2018 11:07:22 +0200
Subject: [PATCH] lxc-to-lxd: Fix rootfs tests
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
lxc-to-lxd/main_migrate_test.go | 29 ++++-------------------------
1 file changed, 4 insertions(+), 25 deletions(-)
diff --git a/lxc-to-lxd/main_migrate_test.go b/lxc-to-lxd/main_migrate_test.go
index 78e5cc0d24..bb7106f384 100644
--- a/lxc-to-lxd/main_migrate_test.go
+++ b/lxc-to-lxd/main_migrate_test.go
@@ -81,17 +81,6 @@ func TestValidateConfig(t *testing.T) {
"Invalid container, missing lxc.rootfs key",
true,
},
- {
- "invalid lxc.rootfs key",
- []string{
- "lxc.uts.name = c1",
- "lxc.apparmor.allow_incomplete = 0",
- "lxc.autodev = 1",
- "lxc.rootfs = /invalid/path",
- },
- "Invalid container, invalid lxc.rootfs key",
- true,
- },
{
"non-existent rootfs path",
[]string{
@@ -268,16 +257,6 @@ func TestConvertStorageConfig(t *testing.T) {
"Invalid path: /foo",
true,
},
- {
- "invalid rootfs",
- []string{
- "lxc.rootfs.path = /invalid",
- "lxc.mount.entry = /lib /lib none ro,bind 0 0",
- },
- types.Devices{},
- "Invalid container, invalid lxc.rootfs key",
- true,
- },
{
"ignored default mounts",
[]string{
@@ -373,16 +352,16 @@ func TestGetRootfs(t *testing.T) {
true,
},
{
- "invalid lxc.rootfs key",
+ "valid lxc.rootfs key (1)",
[]string{
"lxc.rootfs = foobar",
},
+ "foobar",
"",
- "Invalid container, invalid lxc.rootfs key",
- true,
+ false,
},
{
- "valid lxc.rootfs key",
+ "valid lxc.rootfs key (2)",
[]string{
"lxc.rootfs = dir:foobar",
},
More information about the lxc-devel
mailing list