xref: /freebsd/libexec/nuageinit/tests/addgroup.lua (revision 504981357aa36365784458cfe8d9e23097bfac7b)
1a42d6f76SBaptiste Daroussin#!/usr/libexec/flua
2a42d6f76SBaptiste Daroussin
3a42d6f76SBaptiste Daroussinlocal n = require("nuage")
4*50498135SJose Luis Duran
5a42d6f76SBaptiste Daroussinif n.addgroup() then
6a42d6f76SBaptiste Daroussin	n.err("addgroup should not accept empty value")
7a42d6f76SBaptiste Daroussinend
8a42d6f76SBaptiste Daroussinif n.addgroup("plop") then
9a42d6f76SBaptiste Daroussin	n.err("addgroup should not accept empty value")
10a42d6f76SBaptiste Daroussinend
11a42d6f76SBaptiste Daroussinlocal gr = {}
12a42d6f76SBaptiste Daroussingr.name = "impossible_groupname"
13a42d6f76SBaptiste Daroussinlocal res = n.addgroup(gr)
14a42d6f76SBaptiste Daroussinif not res then
15a42d6f76SBaptiste Daroussin	n.err("valid addgroup should return a path")
16a42d6f76SBaptiste Daroussinend
17