Skip to content

Commit

Permalink
Fix merge conflicts, inline setup-vault action
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Oct 7, 2024
1 parent 2b0be9c commit 3e0b393
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 39 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
uses: ./.github/workflows/ci.yml
with:
deploy-docs: true
setup-vault: true
permissions:
contents: write
id-token: write
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
uses: ./.github/workflows/ci.yml
with:
deploy-docs: true
setup-vault: true
release: true
version: ${{ needs.get_tag_version.outputs.version }}
permissions:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
with:
fetch-depth: 2 # coverage: Issue detecting commit SHA

- name: Setup Vault
# renovate: datasource=git-tags depName=https://github.com/eLco/setup-vault depType=action
uses: eLco/setup-vault@5d0ddffdfca9650484ae1378dafc376a9ebcd15e # v1.0.3
with:
vault_version: 1.15.4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
Expand Down
33 changes: 6 additions & 27 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def salt_factories_config(): # pragma: no cover
}


<<<<<<< before updating
@pytest.fixture(scope="module")
def master_config_defaults(vault_port):
def master_config_defaults(vault_port): # pragma: no cover
"""
This default configuration ensures the master issues authentication
credentials with the correct policies. By default, it will issue
Expand Down Expand Up @@ -93,28 +92,23 @@ def master_config_defaults(vault_port):


@pytest.fixture(scope="module")
def master_config_overrides():
=======
@pytest.fixture(scope="package")
def master_config(): # pragma: no cover
>>>>>>> after updating
def master_config_overrides(): # pragma: no cover
"""
You can override the default configuration per package by overriding this
fixture in a conftest.py file.
"""
return {}


<<<<<<< before updating
@pytest.fixture(scope="module")
def master(salt_factories, master_config_defaults, master_config_overrides):
def master(salt_factories, master_config_defaults, master_config_overrides): # pragma: no cover
return salt_factories.salt_master_daemon(
random_string("master-"), defaults=master_config_defaults, overrides=master_config_overrides
)


@pytest.fixture(scope="module")
def minion_config_defaults(vault_port):
def minion_config_defaults(vault_port): # pragma: no cover
"""
The default minion configuration ensures that the minion works in --local
mode and that the ``sdbvault`` SDB configuration is present.
Expand All @@ -138,34 +132,19 @@ def minion_config_defaults(vault_port):


@pytest.fixture(scope="module")
def minion_config_overrides():
=======
@pytest.fixture(scope="package")
def master(salt_factories, master_config): # pragma: no cover
return salt_factories.salt_master_daemon(random_string("master-"), overrides=master_config)


@pytest.fixture(scope="package")
def minion_config(): # pragma: no cover
>>>>>>> after updating
def minion_config_overrides(): # pragma: no cover
"""
You can override the default configuration per package by overriding this
fixture in a conftest.py file.
"""
return {}


<<<<<<< before updating
@pytest.fixture(scope="module")
def minion(master, minion_config_defaults, minion_config_overrides):
def minion(master, minion_config_defaults, minion_config_overrides): # pragma: no cover
return master.salt_minion_daemon(
random_string("minion-"), defaults=minion_config_defaults, overrides=minion_config_overrides
)
=======
@pytest.fixture(scope="package")
def minion(master, minion_config): # pragma: no cover
return master.salt_minion_daemon(random_string("minion-"), overrides=minion_config)
>>>>>>> after updating


@pytest.fixture(scope="session")
Expand Down
11 changes: 1 addition & 10 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
import pytest

<<<<<<< before updating

@pytest.fixture(scope="module")
def master(master):
=======
@pytest.fixture(scope="package")
def master(master): # pragma: no cover
>>>>>>> after updating
with master.started():
yield master


<<<<<<< before updating
@pytest.fixture(scope="module")
def minion(minion):
=======
@pytest.fixture(scope="package")
def minion(minion): # pragma: no cover
>>>>>>> after updating
with minion.started():
yield minion

Expand Down

0 comments on commit 3e0b393

Please sign in to comment.