-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
[WIP] - add check to unit tests to ensure all created payments are valid #15706
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Standard links)
|
eileenmcnaughton
force-pushed
the
bug_test
branch
3 times, most recently
from
November 6, 2019 08:57
4efbcf0
to
30aeb93
Compare
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 6, 2019
While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items. I never managed to replicate it again or determine how the payment came to be in that state but it's been playing in my mind that people could get fatal errors if the financial_items don't exist and dealing with those as regression reports will very tough. So my plan is - for 5.20 add this extra routine to create it if it does not exist - use this mechanism + more digging to figure out how legit an issue it is civicrm#15706 - in future releases 'get noisy' about having to create them if they don't exist - eventually remove this routine
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 6, 2019
While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items. I never managed to replicate it again or determine how the payment came to be in that state but it's been playing in my mind that people could get fatal errors if the financial_items don't exist and dealing with those as regression reports will very tough. So my plan is - for 5.20 add this extra routine to create it if it does not exist - use this mechanism + more digging to figure out how legit an issue it is civicrm#15706 - in future releases 'get noisy' about having to create them if they don't exist - eventually remove this routine
This was referenced Nov 6, 2019
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 6, 2019
While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items. I never managed to replicate it again or determine how the payment came to be in that state but it's been playing in my mind that people could get fatal errors if the financial_items don't exist and dealing with those as regression reports will very tough. So my plan is - for 5.20 add this extra routine to create it if it does not exist - use this mechanism + more digging to figure out how legit an issue it is civicrm#15706 - in future releases 'get noisy' about having to create them if they don't exist - eventually remove this routine
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 6, 2019
While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items. I never managed to replicate it again or determine how the payment came to be in that state but it's been playing in my mind that people could get fatal errors if the financial_items don't exist and dealing with those as regression reports will very tough. So my plan is - for 5.20 add this extra routine to create it if it does not exist - use this mechanism + more digging to figure out how legit an issue it is civicrm#15706 - in future releases 'get noisy' about having to create them if they don't exist - eventually remove this routine
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 6, 2019
While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items. I never managed to replicate it again or determine how the payment came to be in that state but it's been playing in my mind that people could get fatal errors if the financial_items don't exist and dealing with those as regression reports will very tough. So my plan is - for 5.20 add this extra routine to create it if it does not exist - use this mechanism + more digging to figure out how legit an issue it is civicrm#15706 - in future releases 'get noisy' about having to create them if they don't exist - eventually remove this routine
eileenmcnaughton
changed the title
[WIP] - throwing stuff at jenkins
[WIP] - add check to unit tests to ensure all created payments are valid
Nov 8, 2019
This was referenced Nov 8, 2019
test this please |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 11, 2019
…cenario I have discovered a lot of tests are creating invalid contributions - civicrm#15706 So far the issues have been in the test + us permitting something that doesn't work on the form - ie civicrm#15771 I'm trying to work through them all & then we can ideally validate payments in general. In this case it turns out that because 'amount' is currently a 'required' parameter the tests have 'any value' stuck in there. In a real submission it would be calculated so I'm trying to share the code that would do that with the path used by the test (& in this case the api) and to move towards getting the tests valid
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 11, 2019
…cenario I have discovered a lot of tests are creating invalid contributions - civicrm#15706 So far the issues have been in the test + us permitting something that doesn't work on the form - ie civicrm#15771 I'm trying to work through them all & then we can ideally validate payments in general. In this case it turns out that because 'amount' is currently a 'required' parameter the tests have 'any value' stuck in there. In a real submission it would be calculated so I'm trying to share the code that would do that with the path used by the test (& in this case the api) and to move towards getting the tests valid
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 11, 2019
…cenario I have discovered a lot of tests are creating invalid contributions - civicrm#15706 So far the issues have been in the test + us permitting something that doesn't work on the form - ie civicrm#15771 I'm trying to work through them all & then we can ideally validate payments in general. In this case it turns out that because 'amount' is currently a 'required' parameter the tests have 'any value' stuck in there. In a real submission it would be calculated so I'm trying to share the code that would do that with the path used by the test (& in this case the api) and to move towards getting the tests valid
eileenmcnaughton
force-pushed
the
bug_test
branch
from
November 11, 2019 10:16
30aeb93
to
3773097
Compare
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 12, 2019
…cenario I have discovered a lot of tests are creating invalid contributions - civicrm#15706 So far the issues have been in the test + us permitting something that doesn't work on the form - ie civicrm#15771 I'm trying to work through them all & then we can ideally validate payments in general. In this case it turns out that because 'amount' is currently a 'required' parameter the tests have 'any value' stuck in there. In a real submission it would be calculated so I'm trying to share the code that would do that with the path used by the test (& in this case the api) and to move towards getting the tests valid
test this please |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 15, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 15, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 15, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 16, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
force-pushed
the
bug_test
branch
from
November 21, 2019 08:55
3773097
to
b4bdc01
Compare
Honestly - why isn't this failing already? We only need the contributionID so this works
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2019
…lly paying a contribution. As civicrm#15706 signposts - creating a contribution with a status of 'Partially Paid' is not actually a valid thing to do. There are no created financial_trxns & the balance is wrong. In some places the code does this in conjunction with some parameters. These don't really work either. We need to deprecate & eliminate this flow. I'm expecting some tests to fail & need fixing before this passes
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
Will re-open when I want to run again - need to pull out validateContributions - too hard |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 28, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 29, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 29, 2019
Per civicrm#15706 the setup for this test is creating invalid transactions. This fixes - I had to do an order fix in the process
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
A brief description of the pull request. Try to keep it non-technical.
Before
The current status. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.
After
What has been changed. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.
Technical Details
If the PR introduces noteworthy technical changes, please describe them here. Provide code snippets if necessary
Comments
Anything else you would like the reviewer to note