mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Show free memory and test fix
This commit is contained in:
parent
8b98b7990b
commit
277b24e4a1
3 changed files with 13 additions and 8 deletions
10
.github/workflows/test-action.yml
vendored
10
.github/workflows/test-action.yml
vendored
|
@ -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' }}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue