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

Tests: Fix cert revocation tests #140

Closed
wants to merge 2 commits into from
Closed

Conversation

mirielka
Copy link
Contributor

@mirielka mirielka commented Oct 6, 2016

A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349

A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349
@pvomacka
Copy link

pvomacka commented Oct 6, 2016

I think that it is not good idea to remove tests, because we are lowering coverage. Therefore NACK.

Could we rather rewrite these tests? For example issue certain certificates, revoke them and then test whether there are revoked certs with correct revocation reason. I think that our Tracker could help with it.

@mirielka
Copy link
Contributor Author

mirielka commented Oct 6, 2016

Hi, I discussed this with Rob who authored the tests and he said that these tests were there just as a kind of checking that no extra revoked certificates get in. Tests are cca 4 years old, revoked certificates do get in e.g. due to changes in Dogtag (they can be created by other tests and can't be deleted) and cert tests fail. Creating new tests as you described (create cert, revoke it and check it's in the database with correct info) could be separate task, since these tests didn't do such think, they just checked what's already in regardless of how it got there.

@pvomacka
Copy link

pvomacka commented Oct 6, 2016

Yes, that's true and I understand that these tests depend on previous actions.

What I actually wanted to say is that I think that we should rather rewrite these tests right now instead of just removing them.

@alichbox
Copy link

alichbox commented Oct 6, 2016

Ok, I would vote for the new tests and when we have them merged we can safely delete this part of code that is not relevant anymore. The reason we would leave the current (not relevant tests) here is to not loose the information that we need to cover that part.
So my proposal: 1) leave these tests here as they are; 2) write new test suite; 3) delete the old tests; Does it make sense?

@mirielka
Copy link
Contributor Author

mirielka commented Oct 6, 2016

Ok, I will do it like Ales proposed and will sync this PR when new tests are ready.

@mirielka mirielka self-assigned this Oct 6, 2016
@pvomacka pvomacka self-assigned this Oct 6, 2016
@pvomacka
Copy link

pvomacka commented Oct 6, 2016

Hi alichbox,
I agree with steps you are proposing, it does make sense.

Providing tests for certificate revocation to replace deleted tests from
test_cert_find.

https://fedorahosted.org/freeipa/ticket/6349
@MartinBasti MartinBasti changed the title Tests: Remove invalid certplugin tests Tests: Fix cert revocation tests Oct 11, 2016
@pvomacka
Copy link

Works correctly. ACK

@pvomacka pvomacka added the ack Pull Request approved, can be merged label Oct 12, 2016
@MartinBasti
Copy link
Contributor

Tests: Certificate revocation doesn't apply to ipa-4-4 branch, please open separate PR against IPA 4.4

@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Oct 12, 2016
@mirielka mirielka deleted the cert_tests branch October 13, 2016 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
4 participants