Closed diesalbla closed 8 years ago
The instructions for the QA are as follows.
1) In a terminal session open the Redis Client redis-cli
, and clear the cache executing the command flushAll
.
2) In another terminal, run the google-play backend application, using the application.conf
configuration file.
sbt -Dconfig.file="src/main/resources/application.conf" run
3) With a valid androidId
and token
, execute the following command (a call to the endpoint to get many cards):
curl -X POST \
-H "X-Google-Play-Token: <TOKEN>"\
-H "X-Android-ID: <ANDROIDID>"\
-H "Content-Type: application/json"\
--data @body.txt \
"http://localhost:8081/googleplay/cards"
where body.txt
is the file attached to this message.
4) In the terminal with the redis-client
, look up the contents of the cache.
keys "*"
to see all the keys. You should see the new format, with either the words Pending
or Resolved
in them. There should be one key for each package in body.txt
. keys "*Resolved*"
, you should be able to see those resolved packages. These should correspond with those for which a card was returned by the endpoint. keys "*Pending*"
, you should see the packages for which no card was found. echo 'keys "*Resolved*" ' | redis-cli | sed 's:\":\\\":g;s:\(.*\):get "\1":' | redis-cli | jq .
null
. echo 'keys "*Pending*" ' | redis-cli | sed 's:\":\\\":g;s:\(.*\):get "\1":' | redis-cli | jq .
Note: the androidId
and token
do not need to be authenticated, since the operations on the cache are also done with the results from the Web Scrapper.
The purpose of this ticket is to define the datatypes for the new format of keys and values that are to be stored in the Redis Cache.
Each key will be a record that will contain the following fields:
pending
,permanent
,resolved
, orerror
.dateTime
(let us use UTC time zone) in which the error was caused.The types of the values stored will depend upon the type of the key.
For
resolved
orpermanent
entries, the value will be a FullCard.For other responses, the value would have no information.