pulp / pulp-cli-deb

2 stars 11 forks source link

Add gpgkey flag for the remote #109

Closed olwins closed 4 months ago

olwins commented 5 months ago

Fix #108

mdellweg commented 5 months ago

You should adjust the commit message. See https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/ and conclude with an extra line fixes #xyz.

olwins commented 5 months ago

I hope it good now :

olwins commented 5 months ago

Regarding the build failure for some of them it look like the gpg key doesn’t exist ? gpg: WARNING: nothing exported

not sure how to fix that

olwins commented 5 months ago

I can add a test like that, to not fail for the build where the gpg key is missing . But I don't know if that a good idea or not

if  expect_succ gpg --list-keys pulp-fixture-signing-key
then
 expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --gpgkey  "$(gpg --armor --export 'pulp-fixture-signing-key')"
 expect_succ pulp deb remote show --name "${ENTITIES_NAME}"
 assert "$(echo "$OUTPUT" | jq -r .gpgkey)" ==  "$(gpg --armor --export 'pulp-fixture-signing-key')"
fi
mdellweg commented 5 months ago

I can add a test like that, to not fail for the build where the gpg key is missing . But I don't know if that a good idea or not

if  expect_succ gpg --list-keys pulp-fixture-signing-key
then
 expect_succ pulp deb remote update --name "${ENTITIES_NAME}" --gpgkey  "$(gpg --armor --export 'pulp-fixture-signing-key')"
 expect_succ pulp deb remote show --name "${ENTITIES_NAME}"
 assert "$(echo "$OUTPUT" | jq -r .gpgkey)" ==  "$(gpg --armor --export 'pulp-fixture-signing-key')"
fi

Let's keep that as a last resort only.

mdellweg commented 5 months ago

OK, again about the test failures. The coincide to happen on the runners with lower bounds=True. That means we install an older version of pulp-cli and with it i believe a version of the pulp-cli pytest plugin that does not provide the same gpg environment to the tests. Can you skip this part based on the pulp-cli version?

olwins commented 5 months ago

Version test added, I hope that fine :) ( I was hoping to be able to use pulp debug has-plugin, but the cli is not listed there) So my check is a little longer