Skip to content

Convert slapdtest to package with data #78

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

Merged
merged 5 commits into from
Dec 4, 2017

Conversation

tiran
Copy link
Member

@tiran tiran commented Dec 2, 2017

The slapdtest module has been converted to a package to ship the test certs as package data.

Prolong life time of certs.

Closes: #76

@codecov
Copy link

codecov bot commented Dec 2, 2017

Codecov Report

Merging #78 into master will increase coverage by 0.82%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
+ Coverage    65.6%   66.43%   +0.82%     
==========================================
  Files          46       48       +2     
  Lines        4396     4659     +263     
  Branches      749      784      +35     
==========================================
+ Hits         2884     3095     +211     
- Misses       1182     1208      +26     
- Partials      330      356      +26
Impacted Files Coverage Δ
Lib/slapdtest/__init__.py 100% <100%> (ø)
Lib/slapdtest/_slapdtest.py 79.92% <77.77%> (ø)

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 cd6f620...04e6f18. Read the comment docs.

@encukou
Copy link
Member

encukou commented Dec 4, 2017

This is almost what I did offline over the weekend. Let me merge in my changes & rebase.

tiran and others added 4 commits December 4, 2017 11:02
The slapdtest module has been converted to a package to ship the test
certs as package data.

Closes: python-ldap#76
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Now that we ship the certs as part of the package, make them valid for a
longer time. CA validity is one day longer than certs, which are one day
longer valid than CRL.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
We want this to work on any kind of CI, not just the one we use now.
@encukou
Copy link
Member

encukou commented Dec 4, 2017

The biggest change is moving code into a submodule – logic in __init__.py generally leads to horror stories over time.

@tiran
Copy link
Member Author

tiran commented Dec 4, 2017

Any suggestions? Do you want to move SlapdObject and SlapdTestCase to a module and import them into the package? Different module for the test helper functions?

@encukou
Copy link
Member

encukou commented Dec 4, 2017

Put all the code in one private submodule, which can be split later. And import public API into the package. (For "public API" I used what we currently need outside slapdtest; it can be expanded later.)

See this PR. (Best viewed in a local clone; GitHub's timestamp-based order of the commits is confusing.)

__version__ = '3.0.0b1'

from slapdtest._slapdtest import SlapdObject, SlapdTestCase, SysLogHandler
from slapdtest._slapdtest import skip_unless_ci, requires_tls
Copy link
Member Author

Choose a reason for hiding this comment

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

+1

The test helpers could be moved into a separate module.

@encukou encukou merged commit 18f98aa into python-ldap:master Dec 4, 2017
@tiran tiran deleted the slapdtest_pkg branch December 4, 2017 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy