mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Updated testing
This commit is contained in:
parent
22c7173a22
commit
dbfd3b0f19
3 changed files with 21 additions and 19 deletions
6
.github/workflows/test-linux.yml
vendored
6
.github/workflows/test-linux.yml
vendored
|
@ -61,10 +61,12 @@ jobs:
|
|||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
echo "matrix instance ,${{ matrix.instance }},"
|
||||
bt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /')
|
||||
echo "bt parms ,$bt_parms,"
|
||||
sh -x ./bootstrap-salt.sh "$bt_parms"
|
||||
bt_parms2=$(echo "$bt_parms" | sed 's/-/./')
|
||||
echo "bt parms ,$bt_parms, bt_parms2 ,$bt_parms2,"
|
||||
sh -x ./bootstrap-salt.sh "$bt_parms2"
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
|
|
6
.github/workflows/test-macos.yml
vendored
6
.github/workflows/test-macos.yml
vendored
|
@ -53,10 +53,12 @@ jobs:
|
|||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
echo "matrix instance ,${{ matrix.instance }},"
|
||||
bt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /')
|
||||
echo "bt parms ,$bt_parms,"
|
||||
sudo sh -x ./bootstrap-salt.sh "$bt_parms"
|
||||
bt_parms2=$(echo "$bt_parms" | sed 's/-/./')
|
||||
echo "bt parms ,$bt_parms, bt_parms2 ,$bt_parms2,"
|
||||
sh -x ./bootstrap-salt.sh "$bt_parms2"
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
|
|
|
@ -39,22 +39,20 @@ def run_salt_call(cmd):
|
|||
log.error(f"failed to produce output result, '{result}'")
|
||||
|
||||
else:
|
||||
try:
|
||||
cmdl = ["sudo"]
|
||||
cmdl.extend(cmd)
|
||||
cmdl.append("--out=json")
|
||||
result = subprocess.run(cmdl, capture_output=True, text=True)
|
||||
print(
|
||||
f"DGM run_salt_call, cmdl '{cmdl}', result '{result}', stdout '{result.stdout}'",
|
||||
flush=True,
|
||||
)
|
||||
if 0 == result.returncode:
|
||||
json_data = json.loads(result.stdout)
|
||||
else:
|
||||
log.error(f"failed to produce output result, '{result}'")
|
||||
cmdl = ["sudo"]
|
||||
cmdl.extend(cmd)
|
||||
cmdl.append("--out=json")
|
||||
result = subprocess.run(cmdl, capture_output=True, text=True)
|
||||
print(
|
||||
f"DGM run_salt_call, cmdl '{cmdl}', result '{result}', stdout '{result.stdout}'",
|
||||
flush=True,
|
||||
)
|
||||
if 0 == result.returncode:
|
||||
json_data = json.loads(result.stdout)
|
||||
else:
|
||||
log.error(f"failed to produce output result, '{result}'")
|
||||
|
||||
finally:
|
||||
return json_data["local"]
|
||||
return json_data["local"]
|
||||
|
||||
|
||||
def test_ping(path):
|
||||
|
|
Loading…
Add table
Reference in a new issue