Skip to content

Commit

Permalink
Remove incorrect requirement, and add additional comments to test doc…
Browse files Browse the repository at this point in the history
…string
  • Loading branch information
terminalmage authored and Megan Wilhite committed Aug 16, 2023
1 parent a1d5156 commit 01b534d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/pytests/functional/states/pkgrepo/test_debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def test_repo_present_absent_trailing_slash_uri(
pkgrepo, repo_uri, trailing_slash_repo_file
):
"""
test adding a repo with a trailing slash in the uri
test adding and then removing a repo with a trailing slash in the uri
"""
# with the trailing slash
repo_content = f"deb {repo_uri}/ stable main"
Expand Down Expand Up @@ -601,13 +601,20 @@ def test_repo_present_absent_no_trailing_slash_uri_add_slash(
assert ret.result


@pytest.mark.requires_salt_states("pkgrepo.managed", "pkgrepo.absent")
def test_repo_absent_trailing_slash_in_uri(
@pytest.mark.requires_salt_states("pkgrepo.absent")
def test_repo_absent_existing_repo_trailing_slash_uri(
pkgrepo, repo_uri, subtests, trailing_slash_repo_file
):
"""
Test pkgrepo.absent with a URI containing a trailing slash
This test is different from test_repo_present_absent_trailing_slash_uri.
That test first does a pkgrepo.managed with a URI containing a trailing
slash. Since pkgrepo.managed normalizes the URI by removing the trailing
slash, the resulting repo file created by Salt does not contain one. This
tests the case where Salt is asked to remove an existing repo with a
trailing slash in the repo URI.
See https://github.com/saltstack/salt/issues/64286
"""
repo_file = pathlib.Path(trailing_slash_repo_file)
Expand Down

0 comments on commit 01b534d

Please sign in to comment.