Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct get_id_url() for testing Launchpad instances and use launchpadlib.uris.lookup_web_root #234

Merged
merged 2 commits into from Oct 26, 2023

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Oct 26, 2023

The method get_id_url hard-codes the URL to the production Launchpad instance. Use the same logic from get_comment_url to correct it.

There are more Launchpad instances besides production, qastaging, and staging. Rely on launchpadlib.uris.lookup_web_root to map the short instance names to web root URLs.

Successfully run the Launchpad tests locally:

TEST_LAUNCHPAD=1 python3 -m unittest tests/integration/test_crashdb_launchpad.py

So the failing codecov/patch can be ignored.

The method `get_id_url` hard-codes the URL to the production Launchpad
instance. Use the same logic from `get_comment_url` to correct it.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
There are more Launchpad instances besides production, qastaging, and
staging. Rely on `launchpadlib.uris.lookup_web_root` to map the short
instance names to web root URLs.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #234 (2c9ccbb) into main (e14c1e6) will increase coverage by 0.02%.
The diff coverage is 44.44%.

@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
+ Coverage   83.66%   83.69%   +0.02%     
==========================================
  Files          93       93              
  Lines       18758    18754       -4     
==========================================
+ Hits        15694    15696       +2     
+ Misses       3064     3058       -6     
Files Coverage Δ
apport/crashdb_impl/launchpad.py 11.78% <44.44%> (+0.42%) ⬆️

@schopin-pro schopin-pro merged commit 6ef9ac6 into canonical:main Oct 26, 2023
24 of 25 checks passed
@bdrung bdrung deleted the launchpad-instance branch October 26, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants