test_passwords now also removes a user after doing everything else.

This commit is contained in:
Atul Varma 2008-06-20 18:04:59 -07:00
parent 01b47a4865
commit fd24f3706a
2 changed files with 45 additions and 0 deletions

View File

@ -70,6 +70,10 @@ function run_test() {
passwordField: "test_password2"});
runAndEnsureSuccess("add user and re-sync", freshEngineSync);
__fakeUsers.pop();
runAndEnsureSuccess("remove user and re-sync", freshEngineSync);
}
// ----------------------------------------

View File

@ -82,6 +82,47 @@ Testing INFO Opening 'weave/snapshots/passwords.json' for writing.
Testing INFO Writing data to local file 'weave/snapshots/passwords.json': {"version":1,"GUID":"fake-guid","snapshot":{"805ec58eb8dcded602999967e139be21acd0f194":{"hostname":"www.boogle.com","formSubmitURL":"http://www.boogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person","passwordField":"test_password"},"1b3869fc36234b39cd354f661ed1d7d148394ca3":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}}
Service.PasswordEngine INFO Sync complete
Testing INFO Step 'add user and re-sync' succeeded.
Testing INFO Step 'remove user and re-sync' starting.
Testing INFO Opening 'weave/snapshots/passwords.json' for reading.
Testing INFO Reading from stream.
Service.SnapStore INFO Read saved snapshot from disk
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 200
Service.Resource DEBUG GET request successful
Service.JsonFilter DEBUG Decoding JSON data
Service.RemoteStore DEBUG Downloading status file... done
Service.PasswordEngine INFO Local snapshot version: 1
Service.PasswordEngine INFO Server maxVersion: 1
Service.RemoteStore DEBUG Using last sync snapshot as server snapshot (snap version == max version)
Service.RemoteStore TRACE Local snapshot version == server maxVersion
Service.PasswordEngine INFO Reconciling client/server updates
Service.PasswordSync DEBUG Reconciling 1 against 0 commands
Service.PasswordEngine INFO Changes for client: 0
Service.PasswordEngine INFO Predicted changes for server: 1
Service.PasswordEngine INFO Client conflicts: 0
Service.PasswordEngine INFO Server conflicts: 0
Service.PasswordEngine INFO Actual changes for server: 1
Service.PasswordEngine DEBUG Actual changes for server: [{"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}]
Service.PasswordEngine INFO Uploading changes to server
Testing INFO HTTP GET from user-data/passwords/deltas.json, returning status 200
Service.Resource DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.JsonFilter DEBUG Encoding data as JSON
Service.CryptoFilter DEBUG Encrypting data
Testing INFO HTTP PUT to user-data/passwords/deltas.json with data: [[{"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}],[{"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}]]
Service.Resource DEBUG PUT request successful
Service.JsonFilter DEBUG Encoding data as JSON
Testing INFO HTTP PUT to user-data/passwords/status.json with data: {"GUID":"fake-guid","formatVersion":2,"snapVersion":0,"maxVersion":2,"snapEncryption":"none","deltasEncryption":"none","itemCount":1}
Service.Resource DEBUG PUT request successful
Service.PasswordEngine INFO Successfully updated deltas and status on server
Service.SnapStore INFO Saving snapshot to disk
Testing INFO Opening 'weave/snapshots/passwords.json' for writing.
Testing INFO Writing data to local file 'weave/snapshots/passwords.json': {"version":2,"GUID":"fake-guid","snapshot":{"805ec58eb8dcded602999967e139be21acd0f194":{"hostname":"www.boogle.com","formSubmitURL":"http://www.boogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person","passwordField":"test_password"}}}
Service.PasswordEngine INFO Sync complete
Testing INFO Step 'remove user and re-sync' succeeded.
*** test finished
*** exiting
*** PASS ***