mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Add a FIPS enabled test run under PhotonOS 4 to the CI process
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
551443ca7f
commit
02b147ae59
10 changed files with 167 additions and 21 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -2632,6 +2632,29 @@ jobs:
|
|||
workflow-slug: ci
|
||||
default-timeout: 180
|
||||
|
||||
photonos-4-fips:
|
||||
name: Photon OS 4 Test(FIPS)
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- photonos-4-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
|
||||
workflow-slug: ci
|
||||
default-timeout: 180
|
||||
fips: true
|
||||
|
||||
combine-all-code-coverage:
|
||||
name: Combine Code Coverage
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }}
|
||||
|
@ -2709,6 +2732,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -2905,6 +2929,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
- amazonlinux-2-pkg-tests
|
||||
- amazonlinux-2-arm64-pkg-tests
|
||||
- amazonlinux-2023-pkg-tests
|
||||
|
|
25
.github/workflows/nightly.yml
vendored
25
.github/workflows/nightly.yml
vendored
|
@ -2693,6 +2693,29 @@ jobs:
|
|||
workflow-slug: nightly
|
||||
default-timeout: 360
|
||||
|
||||
photonos-4-fips:
|
||||
name: Photon OS 4 Test(FIPS)
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- photonos-4-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
skip-code-coverage: false
|
||||
skip-junit-reports: false
|
||||
workflow-slug: nightly
|
||||
default-timeout: 360
|
||||
fips: true
|
||||
|
||||
combine-all-code-coverage:
|
||||
name: Combine Code Coverage
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }}
|
||||
|
@ -2770,6 +2793,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -3665,6 +3689,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
25
.github/workflows/scheduled.yml
vendored
25
.github/workflows/scheduled.yml
vendored
|
@ -2666,6 +2666,29 @@ jobs:
|
|||
workflow-slug: scheduled
|
||||
default-timeout: 360
|
||||
|
||||
photonos-4-fips:
|
||||
name: Photon OS 4 Test(FIPS)
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- photonos-4-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
skip-code-coverage: false
|
||||
skip-junit-reports: false
|
||||
workflow-slug: scheduled
|
||||
default-timeout: 360
|
||||
fips: true
|
||||
|
||||
combine-all-code-coverage:
|
||||
name: Combine Code Coverage
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }}
|
||||
|
@ -2743,6 +2766,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -2941,6 +2965,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
- amazonlinux-2-pkg-tests
|
||||
- amazonlinux-2-arm64-pkg-tests
|
||||
- amazonlinux-2023-pkg-tests
|
||||
|
|
24
.github/workflows/staging.yml
vendored
24
.github/workflows/staging.yml
vendored
|
@ -2688,6 +2688,29 @@ jobs:
|
|||
workflow-slug: staging
|
||||
default-timeout: 180
|
||||
|
||||
photonos-4-fips:
|
||||
name: Photon OS 4 Test(FIPS)
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- photonos-4-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
skip-code-coverage: true
|
||||
skip-junit-reports: true
|
||||
workflow-slug: staging
|
||||
default-timeout: 180
|
||||
fips: true
|
||||
|
||||
build-src-repo:
|
||||
name: Build Repository
|
||||
environment: staging
|
||||
|
@ -3644,6 +3667,7 @@ jobs:
|
|||
- ubuntu-2004-arm64
|
||||
- ubuntu-2204
|
||||
- ubuntu-2204-arm64
|
||||
- photonos-4-fips
|
||||
- amazonlinux-2-pkg-tests
|
||||
- amazonlinux-2-arm64-pkg-tests
|
||||
- amazonlinux-2023-pkg-tests
|
||||
|
|
16
.github/workflows/templates/test-salt.yml.jinja
vendored
16
.github/workflows/templates/test-salt.yml.jinja
vendored
|
@ -60,11 +60,16 @@
|
|||
<%- endfor %>
|
||||
|
||||
|
||||
<%- for slug, display_name, arch in test_salt_listing["linux"] %>
|
||||
<%- for slug, display_name, arch, fips in test_salt_listing["linux"] %>
|
||||
<%- if fips %>
|
||||
<%- set job_name = slug + "-fips" %>
|
||||
<%- else %>
|
||||
<%- set job_name = slug %>
|
||||
<%- endif %>
|
||||
|
||||
<{ slug.replace(".", "") }>:
|
||||
<%- do test_salt_needs.append(slug.replace(".", "")) %>
|
||||
name: <{ display_name }> Test
|
||||
<{ job_name.replace(".", "") }>:
|
||||
<%- do test_salt_needs.append(job_name.replace(".", "")) %>
|
||||
name: <{ display_name }> Test<% if fips %>(FIPS)<% endif %>
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
|
@ -84,5 +89,8 @@
|
|||
skip-junit-reports: <{ skip_junit_reports_check }>
|
||||
workflow-slug: <{ workflow_slug }>
|
||||
default-timeout: <{ timeout_value }>
|
||||
<%- if fips %>
|
||||
fips: true
|
||||
<%- endif %>
|
||||
|
||||
<%- endfor %>
|
||||
|
|
21
.github/workflows/test-action.yml
vendored
21
.github/workflows/test-action.yml
vendored
|
@ -41,6 +41,11 @@ on:
|
|||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -207,7 +212,7 @@ jobs:
|
|||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
|
@ -216,7 +221,7 @@ jobs:
|
|||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
|
@ -225,7 +230,7 @@ jobs:
|
|||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
|
@ -235,14 +240,14 @@ jobs:
|
|||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}
|
||||
${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
|
@ -250,7 +255,7 @@ jobs:
|
|||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
|
@ -258,7 +263,7 @@ jobs:
|
|||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.distro-slug }} \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
|
@ -267,7 +272,7 @@ jobs:
|
|||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
-E TEST_GROUP ${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \
|
||||
-E TEST_GROUP ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \
|
||||
--test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }}
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
|
|
|
@ -67,6 +67,9 @@ else:
|
|||
# Flag coverage to track suprocesses by pointing it to the right .coveragerc file
|
||||
os.environ["COVERAGE_PROCESS_START"] = str(COVERAGERC_FILE)
|
||||
|
||||
# Variable defining a FIPS test run or not
|
||||
FIPS_TESTRUN = os.environ.get("FIPS_TESTRUN", "0") == "1"
|
||||
|
||||
# Define the pytest plugins we rely on
|
||||
pytest_plugins = ["helpers_namespace"]
|
||||
|
||||
|
@ -1054,7 +1057,10 @@ def salt_syndic_master_factory(
|
|||
config_defaults["syndic_master"] = "localhost"
|
||||
config_defaults["transport"] = request.config.getoption("--transport")
|
||||
|
||||
config_overrides = {"log_level_logfile": "quiet"}
|
||||
config_overrides = {
|
||||
"log_level_logfile": "quiet",
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
ext_pillar = []
|
||||
if salt.utils.platform.is_windows():
|
||||
ext_pillar.append(
|
||||
|
@ -1167,7 +1173,10 @@ def salt_master_factory(
|
|||
config_defaults["syndic_master"] = "localhost"
|
||||
config_defaults["transport"] = salt_syndic_master_factory.config["transport"]
|
||||
|
||||
config_overrides = {"log_level_logfile": "quiet"}
|
||||
config_overrides = {
|
||||
"log_level_logfile": "quiet",
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
ext_pillar = []
|
||||
if salt.utils.platform.is_windows():
|
||||
ext_pillar.append(
|
||||
|
@ -1275,6 +1284,7 @@ def salt_minion_factory(salt_master_factory):
|
|||
"log_level_logfile": "quiet",
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
"pillar_roots": salt_master_factory.config["pillar_roots"].copy(),
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
|
||||
virtualenv_binary = get_virtualenv_binary_path()
|
||||
|
@ -1306,6 +1316,7 @@ def salt_sub_minion_factory(salt_master_factory):
|
|||
"log_level_logfile": "quiet",
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
"pillar_roots": salt_master_factory.config["pillar_roots"].copy(),
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
|
||||
virtualenv_binary = get_virtualenv_binary_path()
|
||||
|
|
|
@ -23,6 +23,7 @@ import salt.ext.tornado.ioloop
|
|||
import salt.utils.files
|
||||
import salt.utils.platform
|
||||
from salt.serializers import yaml
|
||||
from tests.conftest import FIPS_TESTRUN
|
||||
from tests.support.helpers import Webserver, get_virtualenv_binary_path
|
||||
from tests.support.pytest.helpers import TestAccount
|
||||
from tests.support.runtests import RUNTIME_VARS
|
||||
|
@ -186,7 +187,10 @@ def salt_master_factory(
|
|||
os.path.join(RUNTIME_VARS.FILES, "returners")
|
||||
)
|
||||
config_defaults["event_return"] = "runtests_noop"
|
||||
config_overrides = {"pytest-master": {"log": {"level": "DEBUG"}}}
|
||||
config_overrides = {
|
||||
"pytest-master": {"log": {"level": "DEBUG"}},
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
ext_pillar = []
|
||||
if salt.utils.platform.is_windows():
|
||||
ext_pillar.append(
|
||||
|
@ -315,6 +319,7 @@ def salt_minion_factory(salt_master_factory, salt_minion_id, sdb_etcd_port, vaul
|
|||
config_overrides = {
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
"pillar_roots": salt_master_factory.config["pillar_roots"].copy(),
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
|
||||
virtualenv_binary = get_virtualenv_binary_path()
|
||||
|
@ -345,6 +350,7 @@ def salt_sub_minion_factory(salt_master_factory, salt_sub_minion_id):
|
|||
config_overrides = {
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
"pillar_roots": salt_master_factory.config["pillar_roots"].copy(),
|
||||
"fips_mode": FIPS_TESTRUN,
|
||||
}
|
||||
|
||||
virtualenv_binary = get_virtualenv_binary_path()
|
||||
|
|
|
@ -85,7 +85,7 @@ def generate_workflows(ctx: Context):
|
|||
},
|
||||
}
|
||||
test_salt_listing = {
|
||||
"linux": (
|
||||
"linux": [
|
||||
("almalinux-8", "Alma Linux 8", "x86_64"),
|
||||
("almalinux-9", "Alma Linux 9", "x86_64"),
|
||||
("amazonlinux-2", "Amazon Linux 2", "x86_64"),
|
||||
|
@ -114,14 +114,23 @@ def generate_workflows(ctx: Context):
|
|||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64"),
|
||||
("ubuntu-22.04", "Ubuntu 22.04", "x86_64"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64"),
|
||||
),
|
||||
"macos": (("macos-12", "macOS 12", "x86_64"),),
|
||||
"windows": (
|
||||
],
|
||||
"macos": [
|
||||
("macos-12", "macOS 12", "x86_64"),
|
||||
],
|
||||
"windows": [
|
||||
("windows-2016", "Windows 2016", "amd64"),
|
||||
("windows-2019", "Windows 2019", "amd64"),
|
||||
("windows-2022", "Windows 2022", "amd64"),
|
||||
),
|
||||
],
|
||||
}
|
||||
for idx, (slug, display_name, arch) in enumerate(test_salt_listing["linux"][:]):
|
||||
fips = False
|
||||
test_salt_listing["linux"][idx] = (slug, display_name, arch, fips) # type: ignore[assignment]
|
||||
if slug == "photonos-4":
|
||||
fips = True
|
||||
test_salt_listing["linux"].append((slug, display_name, arch, fips)) # type: ignore[arg-type]
|
||||
|
||||
test_salt_pkg_listing = {
|
||||
"linux": (
|
||||
("amazonlinux-2", "Amazon Linux 2", "x86_64", "rpm"),
|
||||
|
|
10
tools/vm.py
10
tools/vm.py
|
@ -306,6 +306,7 @@ def test(
|
|||
print_system_info: bool = False,
|
||||
skip_code_coverage: bool = False,
|
||||
envvars: list[str] = None,
|
||||
fips: bool = False,
|
||||
):
|
||||
"""
|
||||
Run test in the VM.
|
||||
|
@ -341,6 +342,9 @@ def test(
|
|||
if "photonos" in name:
|
||||
skip_known_failures = os.environ.get("SKIP_INITIAL_PHOTONOS_FAILURES", "1")
|
||||
env["SKIP_INITIAL_PHOTONOS_FAILURES"] = skip_known_failures
|
||||
if fips:
|
||||
env["FIPS_TESTRUN"] = "1"
|
||||
vm.run(["tdnf", "install", "-y", "openssl-fips-provider"], sudo=True)
|
||||
if envvars:
|
||||
for key in envvars:
|
||||
if key not in os.environ:
|
||||
|
@ -853,6 +857,9 @@ class VM:
|
|||
forward_agent = "no"
|
||||
else:
|
||||
forward_agent = "yes"
|
||||
ciphers = ""
|
||||
if "photonos" in self.name:
|
||||
ciphers = "Ciphers=aes256-gcm@openssh.com,aes256-cbc,aes256-ctr,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes128-gcm@openssh.com"
|
||||
ssh_config = textwrap.dedent(
|
||||
f"""\
|
||||
Host {self.name}
|
||||
|
@ -864,7 +871,8 @@ class VM:
|
|||
StrictHostKeyChecking=no
|
||||
UserKnownHostsFile=/dev/null
|
||||
ForwardAgent={forward_agent}
|
||||
PasswordAuthentication no
|
||||
PasswordAuthentication=no
|
||||
{ciphers}
|
||||
"""
|
||||
)
|
||||
self.ssh_config_file.write_text(ssh_config)
|
||||
|
|
Loading…
Add table
Reference in a new issue