diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 733e0ab..6cc1626 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.3.dev +current_version = 0.0.5.dev commit = False tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+))? diff --git a/.ci/scripts/validate_commit_message.py b/.ci/scripts/validate_commit_message.py index 2147e20..bdbc082 100644 --- a/.ci/scripts/validate_commit_message.py +++ b/.ci/scripts/validate_commit_message.py @@ -1,23 +1,36 @@ +import os import re import subprocess import sys from pathlib import Path +import toml from github import Github KEYWORDS = ["fixes", "closes"] +BLOCKING_REGEX = [ + "DRAFT", + "WIP", + "NOMERGE", + r"DO\s*NOT\s*MERGE", + "EXPERIMENT", +] NO_ISSUE = "[noissue]" -CHANGELOG_EXTS = [".feature", ".bugfix", ".doc", ".removal", ".misc", ".deprecation"] +CHANGELOG_EXTS = [ + f".{item['directory']}" for item in toml.load("pyproject.toml")["tool"]["towncrier"]["type"] +] sha = sys.argv[1] -project = "pulp-cli-deb" message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8") -g = Github() +if any((re.match(pattern, message) for pattern in BLOCKING_REGEX)): + sys.exit("This PR is not ready for consumption.") + +g = Github(os.environ.get("GITHUB_TOKEN")) repo = g.get_repo("pulp/pulp-cli-deb") -def __check_status(issue): +def check_status(issue): gi = repo.get_issue(int(issue)) if gi.pull_request: sys.exit(f"Error: issue #{issue} is a pull request.") @@ -25,7 +38,7 @@ def __check_status(issue): sys.exit(f"Error: issue #{issue} is closed.") -def __check_changelog(issue): +def check_changelog(issue): matches = list(Path("CHANGES").rglob(f"{issue}.*")) if len(matches) < 1: @@ -38,15 +51,16 @@ def __check_changelog(issue): print("Checking commit message for {sha}.".format(sha=sha[0:7])) # validate the issue attached to the commit -regex = r"(?:{keywords})[\s:]+#(\d+)".format(keywords=("|").join(KEYWORDS)) -pattern = re.compile(regex, re.IGNORECASE) - -issues = pattern.findall(message) +issue_regex = r"(?:{keywords})[\s:]+#(\d+)".format(keywords=("|").join(KEYWORDS)) +issues = re.findall(issue_regex, message, re.IGNORECASE) +cherry_pick_regex = r"^\s*\(cherry picked from commit [0-9a-f]*\)\s*$" +cherry_pick = re.search(cherry_pick_regex, message, re.MULTILINE) if issues: - for issue in pattern.findall(message): - __check_status(issue) - __check_changelog(issue) + for issue in issues: + if not cherry_pick: + check_status(issue) + check_changelog(issue) else: if NO_ISSUE in message: print("Commit {sha} has no issues but is tagged {tag}.".format(sha=sha[0:7], tag=NO_ISSUE)) diff --git a/.github/workflows/kanban.yml b/.github/workflows/kanban.yml deleted file mode 100644 index a884dbf..0000000 --- a/.github/workflows/kanban.yml +++ /dev/null @@ -1,97 +0,0 @@ -# Manage issues in a project board using https://github.com/leonsteinhaeuser/project-beta-automations - ---- -name: Kanban -on: - pull_request_target: - issues: - types: - - labeled - - reopened - - assigned - - closed - -env: - free_to_take: Free to take - in_progress: In Progress - needs_review: Needs review - done: Done - -jobs: - # only prio-list labeled items should be added to the board - add-to-project-board: - if: github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'prio-list') && contains(fromJson('["labeled", "reopened"]'), github.event.action) - runs-on: ubuntu-latest - steps: - - name: Add issue to Free-to-take list - uses: leonsteinhaeuser/project-beta-automations@v2.0.0 - with: - gh_token: ${{ secrets.RELEASE_TOKEN }} - organization: pulp - project_id: 8 - resource_node_id: ${{ github.event.issue.node_id }} - operation_mode: status - status_value: ${{ env.free_to_take }} # Target status - - move-to-inprogress: - if: github.event_name == 'issues' && github.event.action == 'assigned' - runs-on: ubuntu-latest - steps: - - name: Move an issue to the In Progress column - uses: leonsteinhaeuser/project-beta-automations@v2.0.0 - with: - gh_token: ${{ secrets.RELEASE_TOKEN }} - organization: pulp - project_id: 8 - resource_node_id: ${{ github.event.issue.node_id }} - operation_mode: status - status_value: ${{ env.in_progress }} # Target status - - find-linked-issues: - if: github.event_name == 'pull_request_target' - runs-on: ubuntu-latest - name: Find issues linked to a PR - outputs: - linked-issues: ${{ steps.linked-issues.outputs.issues }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Get Linked Issues Action - uses: kin/gh-action-get-linked-issues@v1.0 - id: linked-issues - with: - access-token: ${{ secrets.RELEASE_TOKEN }} - - move-to-needs-review: - if: github.event_name == 'pull_request_target' && contains(fromJson(needs.find-linked-issues.outputs.linked-issues).*.issue.state, 'open') - runs-on: ubuntu-latest - name: Move linked issues to Needs Review - needs: find-linked-issues - strategy: - max-parallel: 3 - matrix: - issues: ${{ fromJSON(needs.find-linked-issues.outputs.linked-issues) }} - steps: - - name: Move to Needs Review - uses: leonsteinhaeuser/project-beta-automations@v2.0.0 - with: - gh_token: ${{ secrets.RELEASE_TOKEN }} - organization: pulp - project_id: 8 - resource_node_id: ${{ matrix.issues.issue.node_id }} - operation_mode: status - status_value: ${{ env.needs_review }} # Target status - - move-to-done: - if: github.event_name == 'issues' && github.event.action == 'closed' - runs-on: ubuntu-latest - steps: - - name: Move an issue to the Done column - uses: leonsteinhaeuser/project-beta-automations@v2.0.0 - with: - gh_token: ${{ secrets.RELEASE_TOKEN }} - organization: pulp - project_id: 8 - resource_node_id: ${{ github.event.issue.node_id }} - operation_mode: status - status_value: ${{ env.done }} # Target status diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b1123d..528accc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,14 +53,16 @@ jobs: - python: "3.6" image_tag: "3.21" - python: "3.7" + pulp_cli: "0.17.0" image_tag: "3.20" - python: "3.8" + pulp_cli: "0.16.0" image_tag: "3.19" - python: "3.9" image_tag: "3.18" - python: "3.10" pulp_cli: "0.15.0" - image_tag: "3.17" + image_tag: "3.22" steps: - uses: actions/checkout@v2 - name: Set up Python @@ -70,7 +72,9 @@ jobs: - name: Install Test Dependencies run: pip install -r test_requirements.txt - name: Install pulp-cli from source - run: pip install git+https://github.com/pulp/pulp-cli@main + run: | + pip install "git+https://github.com/pulp/pulp-cli@main#egg=pulp-glue&subdirectory=pulp-glue" + pip install "git+https://github.com/pulp/pulp-cli@main#egg=pulp-cli" if: ${{ ! matrix.pulp_cli }} - name: Install specific pulp-cli version run: pip install pulp_cli==${{ matrix.pulp_cli }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f4d2844..c1f3c21 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -25,14 +25,16 @@ jobs: - python: "3.6" image_tag: "3.21" - python: "3.7" + pulp_cli: "0.17.0" image_tag: "3.20" - python: "3.8" + pulp_cli: "0.16.0" image_tag: "3.19" - python: "3.9" image_tag: "3.18" - python: "3.10" pulp_cli: "0.15.0" - image_tag: "3.17" + image_tag: "3.22" steps: - uses: actions/checkout@v2 - name: Set up Python @@ -42,7 +44,9 @@ jobs: - name: Install Test Dependencies run: pip install -r test_requirements.txt - name: Install pulp-cli from source - run: pip install git+https://github.com/pulp/pulp-cli@main + run: | + pip install "git+https://github.com/pulp/pulp-cli@main#egg=pulp-glue&subdirectory=pulp-glue" + pip install "git+https://github.com/pulp/pulp-cli@main#egg=pulp-cli" if: ${{ ! matrix.pulp_cli }} - name: Install specific pulp-cli version run: pip install pulp_cli==${{ matrix.pulp_cli }} diff --git a/CHANGES.md b/CHANGES.md index 6b48662..6bebda5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,58 @@ [//]: # (towncrier release notes start) +## 0.0.4 (2023-03-09) +===================== + + +### Misc + +- Adopted PREFIX_ID pattern introduced in pulp-cli 0.14. + [#27](https://github.com/pulp/pulp-cli-deb/issues/27) + + +--- + + +## 0.0.3 (2023-01-03) +===================== + + +### Features + +- Added support for the new --optimize/--no-optimize sync option. + [#31](https://github.com/pulp/pulp-cli-deb/issues/31) +- Use flags for ``--simple`` and ``--structured`` on publication create instead of having users + specify a value of ``True``. + [#36](https://github.com/pulp/pulp-cli-deb/issues/36) + + +### Improved Documentation + +- Added a help text for the --mirror/--no-mirror sync option. + [#30](https://github.com/pulp/pulp-cli-deb/issues/30) + + +### Deprecations and Removals + +- Bumped pulp-cli dependency to >=0.13.0. + [#10](https://github.com/pulp/pulp-cli-deb/issues/10) + + +### Translations + +- Added rudimentary German translations files. + [#10](https://github.com/pulp/pulp-cli-deb/issues/10) + + +### Misc + +- [#10](https://github.com/pulp/pulp-cli-deb/issues/10) + + +--- + + ## 0.0.2 (2022-01-03) ### Features diff --git a/CHANGES/10.misc b/CHANGES/10.misc deleted file mode 100644 index 5b99bee..0000000 --- a/CHANGES/10.misc +++ /dev/null @@ -1 +0,0 @@ -Added facilities for translations. diff --git a/CHANGES/10.removal b/CHANGES/10.removal deleted file mode 100644 index d2cbef0..0000000 --- a/CHANGES/10.removal +++ /dev/null @@ -1 +0,0 @@ -Bumped pulp-cli dependency to >=0.13.0. diff --git a/CHANGES/10.translation b/CHANGES/10.translation deleted file mode 100644 index ef13eb5..0000000 --- a/CHANGES/10.translation +++ /dev/null @@ -1 +0,0 @@ -Added rudimentary German translations files. diff --git a/CHANGES/30.doc b/CHANGES/30.doc deleted file mode 100644 index bd05bc9..0000000 --- a/CHANGES/30.doc +++ /dev/null @@ -1 +0,0 @@ -Added a help text for the --mirror/--no-mirror sync option. diff --git a/CHANGES/31.feature b/CHANGES/31.feature deleted file mode 100644 index d4bda63..0000000 --- a/CHANGES/31.feature +++ /dev/null @@ -1 +0,0 @@ -Added support for the new --optimize/--no-optimize sync option. diff --git a/CHANGES/36.feature b/CHANGES/36.feature deleted file mode 100644 index 9734352..0000000 --- a/CHANGES/36.feature +++ /dev/null @@ -1,2 +0,0 @@ -Use flags for ``--simple`` and ``--structured`` on publication create instead of having users -specify a value of ``True``. diff --git a/pulpcore/cli/deb/context.py b/pulpcore/cli/deb/context.py index b64cf22..d81a523 100644 --- a/pulpcore/cli/deb/context.py +++ b/pulpcore/cli/deb/context.py @@ -4,6 +4,7 @@ from pulpcore.cli.common.context import ( EntityDefinition, PulpEntityContext, + PulpException, PulpRepositoryContext, PulpRepositoryVersionContext, registered_repository_contexts, @@ -18,21 +19,14 @@ class PulpAptDistributionContext(PulpEntityContext): ENTITY = _("apt distribution") ENTITIES = _("apt distributions") HREF = "deb_apt_distribution_href" - LIST_ID = "distributions_deb_apt_list" - READ_ID = "distributions_deb_apt_read" - CREATE_ID = "distributions_deb_apt_create" - UPDATE_ID = "distributions_deb_apt_partial_update" - DELETE_ID = "distributions_deb_apt_delete" + ID_PREFIX = "distributions_deb_apt" class PulpAptPublicationContext(PulpEntityContext): ENTITY = _("apt publication") ENTITIES = _("apt publications") HREF = "deb_apt_publication_href" - LIST_ID = "publications_deb_apt_list" - READ_ID = "publications_deb_apt_read" - CREATE_ID = "publications_deb_apt_create" - DELETE_ID = "publications_deb_apt_delete" + ID_PREFIX = "publications_deb_apt" def preprocess_body(self, body: EntityDefinition) -> EntityDefinition: body = super().preprocess_body(body) @@ -47,10 +41,7 @@ class PulpVerbatimPublicationContext(PulpEntityContext): ENTITY = _("verbatim publication") ENTITIES = _("verbatim publications") HREF = "deb_verbatim_publication_href" - LIST_ID = "publications_deb_verbatim_list" - READ_ID = "publications_deb_verbatim_read" - CREATE_ID = "publications_deb_verbatim_create" - DELETE_ID = "publications_deb_verbatim_delete" + ID_PREFIX = "publications_deb_verbatim" APT_ONLY: ClassVar[Set[str]] = {"simple", "structured", "signing_service"} def preprocess_body(self, body: EntityDefinition) -> EntityDefinition: @@ -71,11 +62,7 @@ class PulpAptRemoteContext(PulpEntityContext): ENTITY = _("apt remote") ENTITIES = _("apt remotes") HREF = "deb_apt_remote_href" - LIST_ID = "remotes_deb_apt_list" - READ_ID = "remotes_deb_apt_read" - CREATE_ID = "remotes_deb_apt_create" - UPDATE_ID = "remotes_deb_apt_partial_update" - DELETE_ID = "remotes_deb_apt_delete" + ID_PREFIX = "remotes_deb_apt" NULLABLES = {"architectures", "components"} @staticmethod @@ -88,13 +75,15 @@ def tuple_to_whitespace_separated_string(field_name: str, body: EntityDefinition If body[field_name] does not contain a tuple, the behaviour is undefined. """ field = body.pop(field_name, None) - if field is not None and field != (): + if field: string_field = " ".join(field).strip() body[field_name] = string_field if string_field else None def preprocess_body(self, body: EntityDefinition) -> EntityDefinition: body = super().preprocess_body(body) self.tuple_to_whitespace_separated_string("distributions", body) + if "distributions" in body and body["distributions"] is None: + raise PulpException("Must have at least one distribution for remote.") self.tuple_to_whitespace_separated_string("components", body) self.tuple_to_whitespace_separated_string("architectures", body) return body @@ -103,21 +92,14 @@ def preprocess_body(self, body: EntityDefinition) -> EntityDefinition: class PulpAptRepositoryVersionContext(PulpRepositoryVersionContext): HREF = "deb_apt_repository_version_href" REPOSITORY_HREF = "deb_apt_repository_href" - LIST_ID = "repositories_deb_apt_versions_list" - READ_ID = "repositories_deb_apt_versions_read" - DELETE_ID = "repositories_deb_apt_versions_delete" + ID_PREFIX = "repositories_deb_apt_versions" class PulpAptRepositoryContext(PulpRepositoryContext): ENTITY = _("apt repository") ENTITIES = _("apt repositories") HREF = "deb_apt_repository_href" - LIST_ID = "repositories_deb_apt_list" - READ_ID = "repositories_deb_apt_read" - CREATE_ID = "repositories_deb_apt_create" - UPDATE_ID = "repositories_deb_apt_partial_update" - DELETE_ID = "repositories_deb_apt_delete" - SYNC_ID = "repositories_deb_apt_sync" + ID_PREFIX = "repositories_deb_apt" VERSION_CONTEXT = PulpAptRepositoryVersionContext diff --git a/releasing.md b/releasing.md new file mode 100644 index 0000000..2276220 --- /dev/null +++ b/releasing.md @@ -0,0 +1,15 @@ +_taken from `pulp-cli` [repository](https://github.com/pulp/pulp-cli/blob/main/releasing.md)_ + +# Releasing (for internal use) + +1. Run `pip install bump2version towncrier==19.9.0 .` (see also the `pulp_deb` release CI) +1. Run `bumpversion release`. +1. Generate the changelog (`towncrier --yes`). +1. Check and fix the changelog according to markdown formatting and language conventions. +1. Commit your local changes with commit message "Release 0.1.0". +1. Run `bumpversion minor` to update the version to the next dev release version and commit with "Bump version to 0.2.0.dev". +1. Push your commits, open a PR, and get it merged. +1. After your PR is merged, pull the latest changes from develop. +1. Now tag your release commit (e.g. `git tag -s 0.1.0`) and push to pulp/pulp-cli. +1. Monitor the build job and then check PyPI to make sure the package has been uploaded and the docs updated. +1. Announce the release at https://discourse.pulpproject.org/c/announcements/6. diff --git a/setup.py b/setup.py index e94b471..136d2e8 100644 --- a/setup.py +++ b/setup.py @@ -1,45 +1,46 @@ -from setuptools import setup - -try: - from setuptools import find_namespace_packages - - plugin_packages = find_namespace_packages( - include=["pulpcore.cli.*"], exclude=["pulpcore.cli.*.*"] - ) - -except ImportError: - # Old versions of setuptools do not provide `find_namespace_packages` - # see https://github.com/pulp/pulp-cli/issues/248 - from setuptools import find_packages - - plugins = find_packages(where="pulpcore/cli") - plugin_packages = [f"pulpcore.cli.{plugin}" for plugin in plugins] - -plugin_entry_points = [(package.rsplit(".", 1)[-1], package) for package in plugin_packages] - - -setup( - name="pulp-cli-deb", - description="Command line interface to talk to pulpcore's REST API. (Debian plugin commands)", - version="0.0.3.dev", - packages=plugin_packages, - package_data={"": ["py.typed", "locale/*/LC_MESSAGES/*.mo"]}, - python_requires=">=3.6", - install_requires=[ - "pulp-cli>=0.19.0", - ], - entry_points={ - "pulp_cli.plugins": [f"{name}={module}" for name, module in plugin_entry_points], - }, - license="GPLv2+", - classifiers=[ - "Development Status :: 3 - Alpha", - "Environment :: Console", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Topic :: System :: Software Distribution", - "Typing :: Typed", - ], -) +from setuptools import setup + +try: + from setuptools import find_namespace_packages + + plugin_packages = find_namespace_packages( + include=["pulpcore.cli.*"], exclude=["pulpcore.cli.*.*"] + ) + +except ImportError: + # Old versions of setuptools do not provide `find_namespace_packages` + # see https://github.com/pulp/pulp-cli/issues/248 + from setuptools import find_packages + + plugins = find_packages(where="pulpcore/cli") + plugin_packages = [f"pulpcore.cli.{plugin}" for plugin in plugins] + +plugin_entry_points = [(package.rsplit(".", 1)[-1], package) for package in plugin_packages] + + +setup( + name="pulp-cli-deb", + description="Command line interface to talk to pulpcore's REST API. (Debian plugin commands)", + url="https://github.com/pulp/pulp-cli-deb", + version="0.0.5.dev", + packages=plugin_packages, + package_data={"": ["py.typed", "locale/*/LC_MESSAGES/*.mo"]}, + python_requires=">=3.6", + install_requires=[ + "pulp-cli>=0.15.0", + ], + entry_points={ + "pulp_cli.plugins": [f"{name}={module}" for name, module in plugin_entry_points], + }, + license="GPLv2+", + classifiers=[ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: System :: Software Distribution", + "Typing :: Typed", + ], +) \ No newline at end of file diff --git a/tests/scripts/pulp_deb/test_deb_remote.sh b/tests/scripts/pulp_deb/test_deb_remote.sh index f0bb6dd..dcb22ff 100755 --- a/tests/scripts/pulp_deb/test_deb_remote.sh +++ b/tests/scripts/pulp_deb/test_deb_remote.sh @@ -13,10 +13,10 @@ trap cleanup EXIT # Fail to create some remotes: expect_fail pulp deb remote create --name "foo" --url "foo" --distribution "" expect_fail pulp deb remote create --name "foo" --url "foo" -expect_fail pulp deb remote create --name "foo" --url "" --distribution "foo" -expect_fail pulp deb remote create --name "foo" --distribution "foo" -expect_fail pulp deb remote create --name "" --url "foo" --distribution "foo" -expect_fail pulp deb remote create --url "foo" --distribution "foo" +expect_fail pulp deb remote create --name "foo" --url "" --distribution "foo" +expect_fail pulp deb remote create --name "foo" --distribution "foo" +expect_fail pulp deb remote create --name "" --url "foo" --distribution "foo" +expect_fail pulp deb remote create --url "foo" --distribution "foo" # Create and trivially update a remote: expect_succ pulp deb remote create --name "${ENTITIES_NAME}" \ @@ -33,43 +33,43 @@ expect_succ pulp deb remote update --name "${ENTITIES_NAME}" # Try some possible modifications of the remote's distribution: expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --distribution "bar" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .distributions)" == "bar" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --distribution "bar" --distribution "baz" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .distributions)" == "bar baz" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --distribution "bar" --distribution "" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .distributions)" == "bar" expect_fail pulp deb remote update --name "${ENTITIES_NAME}" --distribution "" -assert "${ERROUTPUT}" == 'Error: {"distributions":["This field may not be null."]}' +assert "${ERROUTPUT}" == 'Error: Must have at least one distribution for remote.' # Try some possible modifications of the remote's components: expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --component "bar" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .components)" == "bar" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --component "bar" --component "baz" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .components)" == "bar baz" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --component "bar" --component "" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .components)" == "bar" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --component "" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .components)" == "null" # Try some possible modifications of the remote's architectures: expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --architecture "bar" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .architectures)" == "bar" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --architecture "bar" --architecture "baz" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .architectures)" == "bar baz" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --architecture "bar" --architecture "" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .architectures)" == "bar" expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --architecture "" -expect_succ pulp deb remote show --name "${ENTITIES_NAME}" +expect_succ pulp deb remote show --name "${ENTITIES_NAME}" assert "$(echo "$OUTPUT" | jq -r .architectures)" == "null" # Now destroy the remote