fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] thesmallstar commented on pull request #1100: FINERACT-1047 Integration test for Audit trails(Create)
Date Tue, 23 Jun 2020 11:09:52 GMT

thesmallstar commented on pull request #1100:
URL: https://github.com/apache/fineract/pull/1100#issuecomment-648076591


   @vorburger  I was a little worried about this approach though and thought of changing this
to something more robust.
   
   The problem: 
   We are checking count for the entries like this: Get me the count of audit trails whose
resource-id is x it was activated and is of type client. Here, the same event can occur twice
and hence two audits will be returned, which does not necessarily mean that the test failed(since
we are checking count to be equal to one)
   
   The solution:
   Calculate the count before the action(create, update, activate) and check if count incremented
by one, after the action. 
   
   Why the old approach is still correct?
   Two reasons: Every entity is created for the first time, no action is performed twice.

   
   
   Just that I thought it was fundamentally wrong to check count to be one(not a general case),
I hope I am not too confusing. Which approach will you prefer?
   
   
   
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message