1import pytest 2 3 4@pytest.fixture(scope="module") 5def non_root_account(): 6 with pytest.helpers.create_account() as account: 7 yield account 8 9 10@pytest.mark.skip_if_not_root 11def test_exec_code_all(salt_call_cli, non_root_account): 12 ret = salt_call_cli.run( 13 "cmd.exec_code_all", "bash", "echo good", runas=non_root_account.username 14 ) 15 assert ret.exitcode == 0 16