diff options
Diffstat (limited to 'libexec/nuageinit/tests/adduser.lua')
-rw-r--r-- | libexec/nuageinit/tests/adduser.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libexec/nuageinit/tests/adduser.lua b/libexec/nuageinit/tests/adduser.lua new file mode 100644 index 000000000000..cef6be0c0e0c --- /dev/null +++ b/libexec/nuageinit/tests/adduser.lua @@ -0,0 +1,16 @@ +#!/usr/libexec/flua + +local n = require("nuage") + +if n.adduser() then + n.err("adduser should not accept empty value") +end +if n.adduser("plop") then + n.err("adduser should not accept empty value") +end +local pw = {} +pw.name = "impossible_username" +local res = n.adduser(pw) +if not res then + n.err("valid adduser should return a path") +end |