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

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

17 lines
343 B
Lua
Raw Permalink Normal View History

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