Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Replace the community_summary view by a table #2701

Merged
merged 1 commit into from
Aug 28, 2014
Merged

Conversation

Changaco
Copy link
Contributor

Fixes #2693 without reverting back to using slow queries.

Fixes #2693 without reverting back to using slow queries.
@chadwhitacre
Copy link
Contributor

Does the test suite already cover this?

@chadwhitacre
Copy link
Contributor

If not let's get some tests.

@Changaco
Copy link
Contributor Author

The test coverage of gratipay/models/community.py is currently 88%.

@chadwhitacre
Copy link
Contributor

How do we measure test coverage of SQL functions?

@Changaco
Copy link
Contributor Author

We don't, it would probably be very difficult.

@chadwhitacre
Copy link
Contributor

Okay, short of measuring coverage of SQL functions, how do we test SQL functions?

@chadwhitacre
Copy link
Contributor

I like the idea of using more SQL functions and triggers, but I'm concerned about testing.

@Changaco
Copy link
Contributor Author

Like all functions, by writing tests that run them.

@chadwhitacre
Copy link
Contributor

Bringing us back to my original question:

Does the test suite already cover this?

@Changaco
Copy link
Contributor Author

The trigger function in this PR is used and checked in branch.sql itself.

@Changaco
Copy link
Contributor Author

In addition the test suite does cover most functions modified in this PR, like Participant.insert_into_communities().

@chadwhitacre
Copy link
Contributor

The trigger function in this PR is used and checked in branch.sql itself.

That's good and useful now, but that doesn't protect us against regressions in the future. Can we move the nmembers check out of branch.sql (or duplicate it) into our test suite?

@Changaco
Copy link
Contributor Author

Yes, we could. The DB self checks are a larger issue (related to #1549), in this PR I just tried to come up with a quick fix since the bug is visible in the UI.

chadwhitacre added a commit that referenced this pull request Aug 28, 2014
Replace the community_summary view by a table
@chadwhitacre chadwhitacre merged commit 38b62de into master Aug 28, 2014
@chadwhitacre chadwhitacre deleted the fix-members-count branch August 28, 2014 14:44
@chadwhitacre
Copy link
Contributor

@Changaco May I let you deploy?

@Changaco
Copy link
Contributor Author

Yes, will do.

@chadwhitacre
Copy link
Contributor

Thanks. :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Count of community members is always zero on user profiles
3 participants