summaryrefslogtreecommitdiff
path: root/libexec/nuageinit/tests/adduser.lua
blob: cef6be0c0e0c4e4c701af10b39b3dca6b432664a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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