Allow using cached tokens for local integ testing #470
No reviewers
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#470
Loading…
Reference in New Issue
No description provided.
Delete Branch "cached_tokens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(also new TORCACHE env for integ testing to speed up bootstrapping locally)
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/47
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/48
WIP: Allow using cached tokens for local integ testingto Allow using cached tokens for local integ testingf5938cab85
tof2b879a9c4
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/50
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/51
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/52
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/53
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/54
just quesitons and a symantic rename thought
@ -75,6 +76,17 @@ type cwtchPeer struct {
eventBus event.Manager
}
func (cp *cwtchPeer) LoadCachedTokens(tokenServer string, tokens []*privacypass.Token) {
possibly StoreCachedTokens
@ -772,3 +783,3 @@
// Close closes the underlying database and prepared statements
func (cps *CwtchProfileStorage) Close() {
func (cps *CwtchProfileStorage) Close(purgeAllNonSavedMessages bool) {
just asking, whats the future use of this planned to be?
it's used now to differentiate between closing a concurrent database (after opening it to check the password - where we don't want to purge all temp messages) v.s. closing it to shutdown cwtch (where we do)
@ -17,0 +21,4 @@
}
// StoreNewTokens adds tokens to the internal list managed by this TokenManager
func (tm *TokenManager) StoreNewTokens(tokens []*privacypass.Token) {
it's called 'store' here
@ -37,3 +49,1 @@
token := tm.tokens[0]
tm.tokens = tm.tokens[1:]
return token, len(tm.tokens), nil
for serializedToken, token := range tm.tokens {
wnh the change to this for range loop? the above code had a len == 0 check, curious what was tripping up here
changed from a list to a map so we can preserve keys (and delete by key), can't access a map by an index (since all elements have a random index in go by convention)
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/56
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/57