Created
November 23, 2015 16:12
-
-
Save mwillerich/efb9fed51d0430045b31 to your computer and use it in GitHub Desktop.
testing TA-828
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing broadcast: | |
1. get 2 dev or qa instances under your control, and check out the relevant branch on both machines | |
2. note down the instances' hostnames or IPs | |
3. on one of the instances, do this (all commands without the quotes): `rm /mnt/data/www/checkout/shared/config/tokens/* && rm /mnt/data/www/checkout/shared/cache/first-boot` | |
4. wait for 30 seconds or so, then run `restart checkout` | |
5. call this (on one of the instances) to create a file "instance-1.txt", which will hold all translations for that instance: `curl http://{instance-hostname or ip}:8000/api/tokens | python -mjson.tool > instance-1.txt` | |
6. call this on the same instance to create a file "instance-2.txt", which will hold all translations for that instance: `curl http://{other-instance-hostname or ip}:8000/api/tokens | python -mjson.tool > instance-2.txt` | |
7. both SHOULD create a file that has some text (with curly braces and such) in it | |
8. run `diff instance-1.txt instance-2.txt | grep ">" | wc -l` | |
9. you SHOULD get a number as a result that's bigger than 0. | |
10. run `curl -v -X POST -d '{"Type":"tokens","Action":"reload"}' -H "Content-Type: application/json" http://{instance-hostname or ip}:8000/api/notifications/broadcast` | |
11. wait for a minute or so (test fails if you wait longer than 2 minutes for the desired result) | |
12. repeat the calls from step 5,6 and 8 | |
13. you SHOULD get a 0 as result | |
Testing individual instance cache invalidation | |
1. after the first test, make a small text change (add/remove a ., for example) in /my/checkout/registration in production Magnolia and publish it. | |
2. run `curl -v -X POST -d '{"Type":"tokens","Action":"reload"}' -H "Content-Type: application/json" http://{instance-hostname or ip}:8000/api/notifications` | |
3. repeat the calls from step 5,6 and 8 | |
4. you SHOULD get a number as a result that's bigger than 0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Repeat test after initial fail (and subsequent fix) on broadcast cache invalidation:
curl -v -X POST -H "Content-Type: application/json" -d '{"Type":"tokens","Action":"reload"}' http://tokens-dev.co.photobox.com:8000/api/notifications/broadcast
Testing individual instance cache invalidation
curl -v -X POST -H "Content-Type: application/json" -d '{"Type":"tokens","Action":"reload"}' http://matthias-dev.co.photobox.com:8000/api/notifications
diff instance-1.txt instance-2.txt | grep ">" | wc -l
89481
PASSED