opnsense-src/libexec/nuageinit/tests/adduser.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
336 B
Lua
Raw Normal View History

#!/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