mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 20:43:02 +02:00
Previously the sys-cli group was for interactive shell access, but with ever changing requirements this split has become necessary. This commit introduces the 'sysrepo' group for low-level access to all sysrepo commands, i.e., bootstrap only. For user-level shell access a 'klish' group is added which allows users to connect to the CLI. This is now the only group users, including the default 'admin', are members of, effectively making the new 'copy' tool the norm. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
32 lines
968 B
Python
Executable File
32 lines
968 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import infamy
|
|
from infamy.util import wait_boot
|
|
|
|
with infamy.Test() as test:
|
|
with test.step("Initialize"):
|
|
env = infamy.Env()
|
|
target = env.attach("target", "mgmt")
|
|
|
|
with test.step("Configure"):
|
|
target.copy("running", "startup")
|
|
|
|
with test.step("Reboot and wait for the unit to come back"):
|
|
target.startup_override()
|
|
target.copy("running", "startup")
|
|
target.reboot()
|
|
if not wait_boot(target, env):
|
|
test.fail()
|
|
target = env.attach("target", "mgmt", test_reset=False)
|
|
tgtssh = env.attach("target", "mgmt", "ssh")
|
|
|
|
with test.step("Verify user admin is now in wheel group"):
|
|
if not tgtssh.runsh("grep wheel /etc/group | grep 'admin'"):
|
|
test.fail()
|
|
|
|
with test.step("Verify user admin is now in sysrepo group"):
|
|
if not tgtssh.runsh("grep sysrepo /etc/group | grep 'admin'"):
|
|
test.fail()
|
|
|
|
test.succeed()
|