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

[6.3] Access protected repository (BZ: 1242310) #5672

Merged
merged 2 commits into from Dec 13, 2017

Conversation

ldjebran
Copy link
Contributor

@ldjebran ldjebran commented Dec 11, 2017

cover BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1242310
dependency: SatelliteQE/nailgun#471

documented in: https://theforeman.org/plugins/katello/nightly/troubleshooting/index.html#debug-certificate

(sat-6.3) dlezz@dlezz:~/projects/robottelo-fork$ pytest -v tests/foreman/api/test_repository.py::RepositoryTestCase::test_positive_access_protected_repository
============================================ test session starts =============================================
platform linux2 -- Python 2.7.14, pytest-3.2.3, py-1.5.2, pluggy-0.4.0 -- /home/dlezz/.pyenv/versions/2.7.14/envs/sat-6.3/bin/python2.7
cachedir: .cache
rootdir: /home/dlezz/projects/robottelo-fork, inifile:
plugins: xdist-1.20.1, services-1.2.1, mock-1.6.3, forked-0.2, cov-2.5.1, fauxfactory-1.0.1
collected 1 item                                                                                              
2017-12-11 12:37:46 - conftest - DEBUG - BZ deselect is disabled in settings


tests/foreman/api/test_repository.py::RepositoryTestCase::test_positive_access_protected_repository PASSED

========================================= 1 passed in 14.77 seconds ==========================================

@ldjebran ldjebran added 6.3 API Issues and PRs involving the API QETestCoverage Issues and PRs relating to a Satellite bug labels Dec 11, 2017
@ldjebran ldjebran self-assigned this Dec 11, 2017
@codecov
Copy link

codecov bot commented Dec 11, 2017

Codecov Report

Merging #5672 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5672   +/-   ##
=======================================
  Coverage   61.26%   61.26%           
=======================================
  Files          33       33           
  Lines        3681     3681           
=======================================
  Hits         2255     2255           
  Misses       1426     1426

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8c434c...99098c8. Read the comment docs.

Copy link
Contributor

@abalakh abalakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK pending question

unprotected=False,
).create().read_json()
repo_data_file_url = urljoin(
repository_data['full_path'], 'repodata/repomd.xml')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a field full_path? Why not adding that field to nailgun & use read() instead of read_json() then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a read only field, there are many read only fields there, think using read_json is OK as it's a public method, but we should update nailgun to save the read_json data (to not make additional requests) and to check the field in the saved json data if the attribute does not exist.

@ldjebran
Copy link
Contributor Author

@abalakh @oshtaier comments addressed
please notice the dependency nailgun PR: SatelliteQE/nailgun#471

(sat-6.3) dlezz@dlezz:~/projects/robottelo-fork$ pytest -v tests/foreman/api/test_repository.py::RepositoryTestCase::test_positive_access_protected_repository
============================================ test session starts =============================================
platform linux2 -- Python 2.7.14, pytest-3.2.3, py-1.5.2, pluggy-0.4.0 -- /home/dlezz/.pyenv/versions/2.7.14/envs/sat-6.3/bin/python2.7
cachedir: .cache
rootdir: /home/dlezz/projects/robottelo-fork, inifile:
plugins: xdist-1.20.1, services-1.2.1, mock-1.6.3, forked-0.2, cov-2.5.1, fauxfactory-1.0.1
collected 1 item                                                                                              
2017-12-12 14:04:21 - conftest - DEBUG - BZ deselect is disabled in settings


tests/foreman/api/test_repository.py::RepositoryTestCase::test_positive_access_protected_repository PASSED

========================================= 1 passed in 19.69 seconds ==========================================

Copy link
Contributor

@abalakh abalakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Contributor

@oshtaier oshtaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@oshtaier oshtaier merged commit e8822d6 into SatelliteQE:master Dec 13, 2017
@oshtaier oshtaier removed the review label Dec 13, 2017
@ldjebran ldjebran deleted the 6.3.0_qe_test_coverage_1242310 branch January 23, 2018 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues and PRs involving the API QETestCoverage Issues and PRs relating to a Satellite bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants