Show free memory and test fix

This commit is contained in:
Daniel A. Wozniak 2025-01-09 14:37:04 -07:00 committed by Daniel Wozniak
parent 8b98b7990b
commit 277b24e4a1
3 changed files with 13 additions and 8 deletions

View file

@ -148,6 +148,11 @@ jobs:
run: |
ip a
- name: Free Memory Before Container
shell: bash
run: |
free -h
- name: "Create container ${{ matrix.container }}"
run: |
/usr/bin/docker \
@ -240,6 +245,11 @@ jobs:
run: |
docker exec ${{ github.run_id}}_salt-test df -h
- name: Free Memory
shell: bash
run: |
free -h
- name: Run Changed Tests
id: run-fast-changed-tests
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}

View file

@ -8,10 +8,7 @@ from tests.support.case import ModuleCase
def _check_systemctl():
if not hasattr(_check_systemctl, "memo"):
proc = subprocess.run(["localectl"], capture_output=True, check=False)
_check_systemctl.memo = (
b"Failed to get D-Bus connection: No such file or directory" in proc.stderr
or b"Failed to connect to bus: No such file or directory" in proc.stderr
)
_check_systemctl.memo = b"No such file or directory" in proc.stderr
return _check_systemctl.memo
@ -63,6 +60,7 @@ class LocaleModuleTest(ModuleCase):
@pytest.mark.destructive_test
@pytest.mark.slow_test
@pytest.mark.skipif(_check_systemctl(), reason="systemd degraded")
def test_set_locale(self):
original_locale = self.run_function("locale.get_locale")
locale_to_set = self._find_new_locale(original_locale)

View file

@ -21,10 +21,7 @@ except ImportError:
def _check_systemctl():
if not hasattr(_check_systemctl, "memo"):
proc = subprocess.run(["timedatectl"], capture_output=True, check=False)
_check_systemctl.memo = (
b"Failed to get D-Bus connection: No such file or directory" in proc.stderr
or b"Failed to connect to bus: No such file or directory" in proc.stderr
)
_check_systemctl.memo = b"No such file or directory" in proc.stderr
return _check_systemctl.memo