mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
WIP packaging test for salt.ufw
This commit is contained in:
parent
1941ebe28e
commit
51a4a3ba5b
2 changed files with 31 additions and 1 deletions
|
@ -1,2 +1,2 @@
|
|||
pkg/common/salt-master.service /lib/systemd/system
|
||||
pkg/common/salt.ufw /etc/ufw/applications.d
|
||||
pkg/common/salt.ufw /etc/ufw/applications.d/salt-master
|
||||
|
|
30
pkg/tests/integration/test_salt_ufw.py
Normal file
30
pkg/tests/integration/test_salt_ufw.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
import logging
|
||||
import os.path
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
from pytestskipmarkers.utils import platform
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.skip_on_windows()
|
||||
def test_salt_ufw(salt_master, install_salt):
|
||||
"""
|
||||
Test salt.ufw for Debian/Ubuntu salt-master
|
||||
"""
|
||||
log.warning(f"DGM test_salt_ufw install_salt '{install_salt}'")
|
||||
|
||||
if install_salt.distro_id not in ("debian", "ubuntu"):
|
||||
pytest.skip("Only tests Debian / Ubuntu packages")
|
||||
|
||||
pkg = [x for x in install_salt.pkgs if "deb" in x]
|
||||
if not pkg:
|
||||
pytest.skip("Not testing deb packages")
|
||||
pkg = pkg[0].split("/")[-1]
|
||||
if "rc" not in pkg:
|
||||
pytest.skip("Not testing an RC package")
|
||||
|
||||
ufw_master_path = Path("/etc/ufw/applications.d/salt-master")
|
||||
assert ufw_master_path.is_file()
|
Loading…
Add table
Reference in a new issue