Modify /usr/share/sdwdate/unit_test
- Make it simpler (to split urls into chunks of 3)
- Generate average, total etc for each pool
- add curl command for the failures (timeouts)
Refer T647 for the o/p expected from unit_test
Modify /usr/share/sdwdate/unit_test
Refer T647 for the o/p expected from unit_test
Kindly review
https://github.com/joysn/sdwdate/commit/d6f9492bef7dbdf8bda237c0669de2c0b86b76a7#diff-e68acbfa3dee096d2c84e3cfe6773f30
The modified onion_tester output looks likes
user@host:~/sdwdate/usr/share/sdwdate$ ./onion_tester Current Time Stamp: 1504284400 Starting remotes check... Testing the URL Chunk: ['secrdrop5wyphb5x.onion', 'zdf4nikyuswdzbt6.onion', '3expgpdnrrzezf7r.onion'] pool 1 url secrdrop5wyphb5x.onion: Time: 1504284405 Difference: 2 pool 1 url zdf4nikyuswdzbt6.onion: Time: 1504284407 Difference: 0 pool 1 url 3expgpdnrrzezf7r.onion: Time: 1504284407 Difference: 0 : : Testing the URL Chunk: ['v6gdwmm7ed4oifvd.onion', 'poulsensqiv6ocq4.onion', 'mprt35sjunnxfa76.onion'] pool 1 url v6gdwmm7ed4oifvd.onion: Time: 1504284812 Difference: 9 pool 1 url poulsensqiv6ocq4.onion: Time: 1504284850 Difference: 1 pool 1 url mprt35sjunnxfa76.onion: Time: 1504284810 Difference: 1 Testing the URL Chunk: ['propub3r6espa33w.onion', 'tigas3l7uusztiqu.onion', 'nrktipspgpsyoqwo.onion'] pool 1 url propub3r6espa33w.onion: Time: 1504284858 Difference: 0 pool 1 url tigas3l7uusztiqu.onion: Time: 1504284858 Difference: 0 pool 1 url nrktipspgpsyoqwo.onion: Time: 1504284857 Difference: 1 Testing the URL Chunk: ['lijbt6ju7m6opkzb.onion', 'rkphrici4u5ffhhm.onion'] pool 1 url lijbt6ju7m6opkzb.onion: Time: 1504284864 Difference: 1 pool 1 url rkphrici4u5ffhhm.onion: Time: 1504284864 Difference: 1 ############################## Avg of Pool :1 having URLs #:32 is 4.53125 ############################## Testing the URL Chunk: ['evz2fbu64s3lzhsi.onion', '754hkfmiyumu5xlc.onion', 'owmx2uvjkmdgsap2.onion'] pool 2 url evz2fbu64s3lzhsi.onion: Time: 1504284871 Difference: 0 pool 2 url 754hkfmiyumu5xlc.onion: Time: 1504284870 Difference: 1 pool 2 url owmx2uvjkmdgsap2.onion: Time: 1504284874 Difference: -3 : : Testing the URL Chunk: ['wooprzddebtxfhnq.onion', 'xogxzfyhwmgfvmlr.onion', 'kbbqa63mo7cchzut.onion'] pool 2 url wooprzddebtxfhnq.onion: Time: 1504285357 Difference: 4 pool 2 url xogxzfyhwmgfvmlr.onion: Time: 1504285361 Difference: 0 pool 2 url kbbqa63mo7cchzut.onion: Time: 1504285359 Difference: 2 Testing the URL Chunk: ['ai3dvhjytrgice5h.onion', 'nhzgrlwhukwtajz4.onion', '47hbff4rtpwfpwlr.onion'] pool 2 url ai3dvhjytrgice5h.onion: Time: 1504285366 Difference: 2 pool 2 url nhzgrlwhukwtajz4.onion: Time: 1504285368 Difference: 0 pool 2 url 47hbff4rtpwfpwlr.onion: Time: 1504285366 Difference: 2 Testing the URL Chunk: ['pgpkeysximvxiazm.onion'] pool 2 url pgpkeysximvxiazm.onion: Time: 1504285372 Difference: 0 ############################## Avg of Pool :2 having URLs #:43 is 4.093023255813954 ############################## Testing the URL Chunk: ['intelexi7yo7mj7j.onion', 'earthqfvaeuv5bla.onion', 'cheettyiapsyciew.onion'] pool 3 url intelexi7yo7mj7j.onion: Time: 1504285380 Difference: 1 pool 3 url earthqfvaeuv5bla.onion: Time: 1504285377 Difference: 4 pool 3 url cheettyiapsyciew.onion: Time: 1504285377 Difference: 4 Testing the URL Chunk: ['7tm2lzezyjwtpn2s.onion', 'deepdot35wvmeyd5.onion', '3kyl4i7bfdgwelmf.onion'] pool 3 url 7tm2lzezyjwtpn2s.onion: Time: 1504285382 Difference: 9 pool 3 url deepdot35wvmeyd5.onion: Timeout (Curl --head is OK) pool 3 url 3kyl4i7bfdgwelmf.onion: Time: 1504285387 Difference: 3 : : Testing the URL Chunk: ['gnvweaoe2xzjqldu.onion', 'ex4gh7cig5ssn2xm.onion', 'ynvs3km32u33agwq.onion'] pool 3 url gnvweaoe2xzjqldu.onion: Time: 1504285826 Difference: 8 pool 3 url ex4gh7cig5ssn2xm.onion: Time: 1504285833 Difference: 1 pool 3 url ynvs3km32u33agwq.onion: Time: 1504285826 Difference: 8 Testing the URL Chunk: ['sgvtcaew4bxjd7ln.onion', 'qqvyib4j3fz66nuc.onion', '2qlvvvnhqyda2ahd.onion'] pool 3 url sgvtcaew4bxjd7ln.onion: Time: 1504285844 Difference: 1 pool 3 url qqvyib4j3fz66nuc.onion: Time: 1504285841 Difference: 4 pool 3 url 2qlvvvnhqyda2ahd.onion: Time: 1504285843 Difference: 2 Testing the URL Chunk: ['gl3n4wtekbfaubye.onion', 'sejnfjrq6szgca7v.onion', 'lljrzrimek6if67j.onion'] pool 3 url gl3n4wtekbfaubye.onion: Time: 1504285850 Difference: 3 pool 3 url sejnfjrq6szgca7v.onion: Time: 1504285851 Difference: 2 pool 3 url lljrzrimek6if67j.onion: Time: 1504285853 Difference: 0 ############################## Avg of Pool :3 having URLs #:132 is 3.1893939393939394 ##############################
add curl command for the failures (timeouts)
This meant to echo
curl --head url.onion
so it can be copied and pasted for manual testing.