From 136920404def25a8fbfae7d6529a3fc54c8acc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Mon, 17 Apr 2017 20:37:26 +0200 Subject: [PATCH] Add (QUnit) server tests --- server/tests/test.js | 201 ++++++++++++++++++++++ server/tests/tests.html | 17 ++ server/tests/users/test-v7/gpass.bdd | Bin 0 -> 16384 bytes server/tests/users/test-v7/gpass.bdd.init | Bin 0 -> 16384 bytes server/tests/users/test-v7/index.php | 23 +++ 5 files changed, 241 insertions(+) create mode 100644 server/tests/test.js create mode 100644 server/tests/tests.html create mode 100644 server/tests/users/test-v7/gpass.bdd create mode 100644 server/tests/users/test-v7/gpass.bdd.init create mode 100644 server/tests/users/test-v7/index.php diff --git a/server/tests/test.js b/server/tests/test.js new file mode 100644 index 0000000..05e5719 --- /dev/null +++ b/server/tests/test.js @@ -0,0 +1,201 @@ +server_url = "https://gpass.soutade.fr"; +current_user = "test-v7"; +pbkdf2_level = 1000; +CRYPTO_V1_COMPATIBLE = 1; +use_shadow_logins = false; + +/* + Must contains : + URL login password masterkey + ----------------------------------------------------------------- +v7 format + test test test test + test2 test2 test2 test2 (+shadow login) + test16 test16 testtesttesttest test16 + test17 test17 testtesttesttestt test17 +v8 format + testv8 testv8 testv8 testv8 + testv8_2 testv8_2 testv8_2 testv8_2 (+shadow login) + testv8_16 testv8_16 testtesttesttest testv8_16 + testv8_17 testv8_17 testtesttesttestt testv8_17 + + We assume shadow logins are enabled in server side +*/ + +function alert(a) {} +function nb_unciphered_passwords(passwords) +{ + var nb_unciphered = 0; + for(i=0;i + + + + + QUnit Example + + + +
+
+ + + + + + diff --git a/server/tests/users/test-v7/gpass.bdd b/server/tests/users/test-v7/gpass.bdd new file mode 100644 index 0000000000000000000000000000000000000000..b1223773f1dbc23722aac05b5047b16fb2e0cb61 GIT binary patch literal 16384 zcmeI0&2C#o6vwY)w{{a8qe@k_UQ{I!MLIKQJ{L%&m4S)|K?q0{3u`{kq!DRcYD3wY zCqO&^F93VibPwVIShHh^gjjK|OA6hPMTmsZjC_6XosTo;{LcR@?!5Qz-J=DK%k0sE zuoz?WV$&rz^jp*2{Gl0LAAQfa+A4uc zpc1GADuGI%5~u_!fl8nfs01p3a}qe{_P4HG>nt}GAs$njos{|}mm@lRwC7REti=zj0Id1dzS zVVKWXe{0VfUUh9B&km1H#vknN-+psWW``MD`K z$MgFk&mK>oUyX8yN5b*q+2mEvsgJXd=&zl4WM^mX^46BG^76JSDSj+yzu_UH|tM^znn7>b$KOF2~+}=KqXKK zR05SiC2&CmmWS*8o0a3Iv(Fvd%d6fqi0F?cTAd2m+#@%qajTlxMF|NbZZMqb-mP zIg=t9p%87509IhpB}m5!a$W#Os*AEV`NF}Ym#Er6s93`}ikwenmfQVjt|}rB!h00H zpj8+(3F|^^6O|ZLqFiJ_tw{!umO0zRR&~lInFKnpx5fZRMNvsW&ju5_BQpz#il7of z8_ARs8gQA|!#4G)B-W7A-W%)pN1S)cbC)LZU#F8X9<@N}08K2+(icDd-2zx7FP zIqaPGwBu5noU=|cdhMjMP9eJOq_a)|udq2~+}=KqXKK{O<_#I^E7-?GKU?G_?Q# literal 0 HcmV?d00001 diff --git a/server/tests/users/test-v7/gpass.bdd.init b/server/tests/users/test-v7/gpass.bdd.init new file mode 100644 index 0000000000000000000000000000000000000000..b1223773f1dbc23722aac05b5047b16fb2e0cb61 GIT binary patch literal 16384 zcmeI0&2C#o6vwY)w{{a8qe@k_UQ{I!MLIKQJ{L%&m4S)|K?q0{3u`{kq!DRcYD3wY zCqO&^F93VibPwVIShHh^gjjK|OA6hPMTmsZjC_6XosTo;{LcR@?!5Qz-J=DK%k0sE zuoz?WV$&rz^jp*2{Gl0LAAQfa+A4uc zpc1GADuGI%5~u_!fl8nfs01p3a}qe{_P4HG>nt}GAs$njos{|}mm@lRwC7REti=zj0Id1dzS zVVKWXe{0VfUUh9B&km1H#vknN-+psWW``MD`K z$MgFk&mK>oUyX8yN5b*q+2mEvsgJXd=&zl4WM^mX^46BG^76JSDSj+yzu_UH|tM^znn7>b$KOF2~+}=KqXKK zR05SiC2&CmmWS*8o0a3Iv(Fvd%d6fqi0F?cTAd2m+#@%qajTlxMF|NbZZMqb-mP zIg=t9p%87509IhpB}m5!a$W#Os*AEV`NF}Ym#Er6s93`}ikwenmfQVjt|}rB!h00H zpj8+(3F|^^6O|ZLqFiJ_tw{!umO0zRR&~lInFKnpx5fZRMNvsW&ju5_BQpz#il7of z8_ARs8gQA|!#4G)B-W7A-W%)pN1S)cbC)LZU#F8X9<@N}08K2+(icDd-2zx7FP zIqaPGwBu5noU=|cdhMjMP9eJOq_a)|udq2~+}=KqXKK{O<_#I^E7-?GKU?G_?Q# literal 0 HcmV?d00001 diff --git a/server/tests/users/test-v7/index.php b/server/tests/users/test-v7/index.php new file mode 100644 index 0000000..3f09c8a --- /dev/null +++ b/server/tests/users/test-v7/index.php @@ -0,0 +1,23 @@ +. +*/ + +include "../../_user"; + +?> \ No newline at end of file