42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
Test Author: Kevin
|
|
If it breaks: Kevin
|
|
|
|
This will test our ability to generate and enforce keycodes.
|
|
|
|
1) Find spark_private.pem and spark_public.pem in bts\spark\src\lib\utils\crypto copy them to your sparkd binary location
|
|
|
|
2) Now generate a keycode to a file:
|
|
|
|
./sparkd keycode encode -keyfile:spark_private.pem -pass:BT5u53r -users:1 -expiration:2020-05-18 > test.pem
|
|
|
|
3) Now decode the keycode
|
|
|
|
./sparkd keycode decode -keyfile:spark_public.pem -source:test.pem
|
|
|
|
You should see keycode details printed to screen
|
|
|
|
4) Now test concurrent logins. Start a sparkd.
|
|
a) Start a spark -multiple login as bts and go to where you would see some market data
|
|
b) Start another spark -multiple but log in as bts_2 and display some data
|
|
c) Start a third spark -multiple, log in as bts_2 and display some data.
|
|
|
|
-You should see the data zero out on the first instance logged in as bts_2 and data ticking on the bts instance as well as
|
|
the second bts_2 instance
|
|
|
|
d)Kill your sparkd
|
|
|
|
4.5) For extra credit generate a keycode with -allow_concurrent and make sure we don't zero the market data for concurrent logins
|
|
|
|
5) Test expiration. Generate a keycode in the past:
|
|
|
|
./sparkd keycode encode -keyfile:spark_private.pem -pass:BT5u53r -users:1 -expiration:2018-05-18 > ~/sparkdata/conf/keycode.conf
|
|
|
|
a) start sparkd again.
|
|
b) Start a spark -multiple login as bts_2 and go to where you would see some market data. You should NOT see data
|
|
c) Start a spark -multiple login as bts, you should see data.
|
|
d) remove the expired keycode you just generated by:
|
|
rm ~/sparkdata/conf/keycode.conf
|
|
e) restart sparkd, you should see data as normal in bts_2
|
|
|
|
|