Skip to content

Commit 316e65a

Browse files
committed
Updated tests, and debugging, min Python version 3.6
1 parent 0075aa9 commit 316e65a

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ repos:
4141
rev: v3.15.0
4242
hooks:
4343
- id: pyupgrade
44-
name: Rewrite Code to be Py3.9+
45-
args: [--py39-plus]
44+
name: Rewrite Code to be Py3.6+
45+
args: [--py36-plus]
46+
## DGM name: Rewrite Code to be Py3.9+
47+
## DGM args: [--py39-plus]
4648

4749
- repo: https://github.com/asottile/reorder_python_imports
4850
rev: v3.12.0

bootstrap-salt.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#======================================================================================================================
2727
set -o nounset # Treat unset variables as an error
2828

29-
__ScriptVersion="2024.12.09"
29+
__ScriptVersion="2024.12.12"
3030
__ScriptName="bootstrap-salt.sh"
3131

3232
__ScriptFullName="$0"
@@ -2468,6 +2468,12 @@ __check_services_systemd() {
24682468
servicename=$1
24692469
echodebug "Checking if service ${servicename} is enabled"
24702470

2471+
## DGM
2472+
if [ "${DISTRO_NAME_L}" = "amazon_linux_ami" ] && [ "${DISTRO_VERSION}" = "2" ]; then
2473+
echoinfo "DGM skipping the is-enabled test on AMZN2, since command 'systemctl is-enabled salt-minion' is generating error msg 'Failed to get D-Bus connection: No such file or directory' on AMZN2 container"
2474+
return 0
2475+
fi
2476+
24712477
if [ "$(systemctl is-enabled "${servicename}")" = "enabled" ]; then
24722478
echodebug "Service ${servicename} is enabled"
24732479
return 0

tests/integration/test_installation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def run_salt_call(cmd):
4545
try:
4646
result = subprocess.run(cmdl, capture_output=True, text=True)
4747
except TypeError:
48-
result = subprocess.run(cmdl, text=True)
48+
result = subprocess.run(
49+
cmdl, stdout=PIPE, stderr=PIPE, universal_newlines=True
50+
)
4951
print(f"DGM run_salt_call result '{result}'", flush=True)
5052
if 0 == result.returncode:
5153
json_data = json.loads(result.stdout)

0 commit comments

Comments
 (0)