aboutsummaryrefslogtreecommitdiff
path: root/libexec/nuageinit/tests/addgroup.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/nuageinit/tests/addgroup.lua')
-rw-r--r--libexec/nuageinit/tests/addgroup.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/libexec/nuageinit/tests/addgroup.lua b/libexec/nuageinit/tests/addgroup.lua
new file mode 100644
index 000000000000..60a0d8346793
--- /dev/null
+++ b/libexec/nuageinit/tests/addgroup.lua
@@ -0,0 +1,15 @@
+#!/usr/libexec/flua
+
+local n = require("nuage")
+if n.addgroup() then
+ n.err("addgroup should not accept empty value")
+end
+if n.addgroup("plop") then
+ n.err("addgroup should not accept empty value")
+end
+local gr = {}
+gr.name = "impossible_groupname"
+local res = n.addgroup(gr)
+if not res then
+ n.err("valid addgroup should return a path")
+end