This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).
We need to test:
1) Loading users from various services (hook_info + hook_auth)
2) Changing a user's roles
3) Deleting a blocked user's session
4) Submitting a username with an invalid character
5) User searching
6) All the user blocks
7) Updating users from the old to the new hashing algorithm
8) Permissions, roles, multiple roles, etc.
9) Signatures
10) All user actions.
Comment | File | Size | Author |
---|---|---|---|
#35 | 276582-additionalusertests-v4.patch | 3.08 KB | Brandonian |
#30 | 276582-additionalusertests-v3.patch | 2.91 KB | aspilicious |
#23 | 276582-additionalusertests-v2.patch | 2.78 KB | caelon |
#22 | 276582-additionalusertests.patch | 3.02 KB | Brandonian |
#18 | user-test.patch | 3.56 KB | bleen |
Comments
Comment #1
bardaqani CreditAttribution: bardaqani commentedI will do my hardest best to complete this test within the next two weeks.
Comment #2
mdupontIs this issue still active? The above URL gives me an error. By the way, if it is, it would still need some testing.
Comment #3
Dave ReidThe user role and permissions tests are being added in #300993: User roles and permissions API.
Comment #4
TommyK CreditAttribution: TommyK commentedFrom the list in the initial issue:
4) Submitting a username with an invalid character
Coverage seems to have been started, but all illegal characters do not seem to be tested. It only seems that the forward slash is tested for.
Comment #5
rgon CreditAttribution: rgon commented9) Signatures in the issue list above:
There appears to be no tests for existence or validity of signature in user.test
A test might include:
1) enabling of signatures
2) creation of new user
3) creation of valid and invalid signatures for user
4) enable comment module if not so
5) create comment to check that signature appears
6) remove comment and created user
Comment #6
Chris CharltonMissing "Who's New" block test. (#6 on the list above)
Comment #7
Chris CharltonNo user search test committed yet. (#5 on the list above)
Comment #8
Chris CharltonTest missing for creating a new role (for example: "test" user role), and assigning user(s) to that role. Also, multiple role needs to be accounted for.
It would be expected that the following would be in the test:
- Create new user.
- Create new role(s).
- Apply core permission(s) to the new role.
- ...
- revoke role from user
- remove role from site
Comment #9
sun.core CreditAttribution: sun.core commentedAlbeit really needed, this is not critical.
Comment #10
webchickTagging.
Comment #11
bleen CreditAttribution: bleen commentedsubscribe
Comment #12
bleen CreditAttribution: bleen commentedthe attached patch has tests for the "who's new" block and for signatures...
There is one weirdness on signatures: The test I'm using works (user with signature can leave a comment and the comment will have the correct sig), but for some (inexplicable) reason I cannot seem to verify that the user has properly created a signature when filling out the profile form. To see what I'm referring to, please see the @todo in this patch. Un commenting that chunk *should* work, but it does not.
Any ideas on that? Once I get past that roadblock I will try to make a few more user tests
Comment #13
bleen CreditAttribution: bleen commentedooops ... forgot patch
Comment #15
bleen CreditAttribution: bleen commentedobviously this will fail testing ... I still need someone to review though
Comment #16
bleen CreditAttribution: bleen commentedIgnore comment #15 .. clearly I was drunk (aka meant to post that on another "Tests" issue I was working on)
looking at this error
Comment #17
bleen CreditAttribution: bleen commentedTurns out that this test found an error when using signatures: #699594: Comments throw error when user has a signature
Once that issue is fixed, the test in #13 *should* be working
Comment #18
bleen CreditAttribution: bleen commentedThis patch adds one more small test for signatures ... again, #699594: Comments throw error when user has a signature needs to be fixed before this patch will pass
Comment #20
bleen CreditAttribution: bleen commentedOk ... patch in #18 is waiting for #520760: SA-CORE-2009-007 user signature format to land before testbot will be happy with it
Comment #21
aspilicious CreditAttribution: aspilicious commentedsub
Comment #22
Brandonian CreditAttribution: Brandonian commentedAdded a SimpleTest that creates a user and role from the api using user_save and user_role save, as well as removing the role with user_role_delete. As far as I understand what's supposed to be happening, the code in the test should pass, but two of the tests fail. These tests relate to the Role ID being returned from the database not returning as an int, as expected from user_role_delete. Additional eyes are welcome.
Comment #23
caelon CreditAttribution: caelon commentedHad to modify the patch as it had git-styled dates and was messing up the patching process. When I run this test it passes all.
Comment #24
pcarman CreditAttribution: pcarman commentedsubscribing
Comment #25
jhurst CreditAttribution: jhurst commentedpassed all tests
Comment #27
paulmckibben#23: 276582-additionalusertests-v2.patch queued for re-testing.
Comment #28
stupiddingo CreditAttribution: stupiddingo commentedAll 924 user tests passed for 276582-additionalusertests-v2.patch.
Comment #29
webchickHm. I can't get this to apply cleanly. Can someone give it a re-roll?
Comment #30
aspilicious CreditAttribution: aspilicious commentedI could apply it, problem possible caused by the /no newline at the end of the file.
Anyway: reroll
Comment #31
aspilicious CreditAttribution: aspilicious commentedComment #32
bleen CreditAttribution: bleen commentedwhite space issues
more white space
I'm sure this is just something that I'm unfamiliar with, but why are we using ":" here and not "%"?
95 critical left. Go review some!
Comment #33
Brandonian CreditAttribution: Brandonian commentedThe ':uid' markup is what's in the database abstraction layer documentation.
http://drupal.org/node/310072
I understand that's how it was in D6, and if % signs are the correct way to go, I'll modify the code.
Comment #34
bleen CreditAttribution: bleen commenteddont change it ... I just hadnt seen that syntax before. Based on the link you posted, it certainly seems correct. Still have white space issues thought ;)
Comment #35
Brandonian CreditAttribution: Brandonian commentedDetails, details... ;-)
Patch takes care of the white space issues in the new test. I'd like to run it through code review, but it screams when I try to enable in on HEAD.
Comment #36
bleen CreditAttribution: bleen commentedhere testbot ... here boy
Comment #37
Brandonian CreditAttribution: Brandonian commentedbump, easy review for somebody...
Comment #38
pcarman CreditAttribution: pcarman commentedLooked over the patch at comment #35. The patch logic seems fine to me and test passes. The patch line numbers did not match up for me but was able to put in the changes. Although the variable names are camel case when I think they should be lower case with underscores. See the Drupal coding standard:
http://drupal.org/coding-standards#naming
This is a little confusing since objects are camel case in SimpleTest. Should this be changed? Looks like other test are using lower case with underscores for variable names.
Comment #39
mdupontStumbled upon this old issue. AFAICS, all the tests listed in the original post can be found in user.test in D7. I assume the work was done and committed somewhere else, so I set this issue fixed.