diff options
Diffstat (limited to 'libexec/nuageinit/tests/addgroup.lua')
-rw-r--r-- | libexec/nuageinit/tests/addgroup.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libexec/nuageinit/tests/addgroup.lua b/libexec/nuageinit/tests/addgroup.lua new file mode 100644 index 000000000000..a36a5e24c7b3 --- /dev/null +++ b/libexec/nuageinit/tests/addgroup.lua @@ -0,0 +1,16 @@ +#!/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 |