List of commits:
Subject Hash Author Date (UTC)
tests: fixed wh_http - time race closed 8f182423103c8fc2a4be10840b08be0564e2c814 Catalin(ux) M. BOIE 2017-07-02 07:01:12
Add texts about the under age and about what laws you have to respect 65af692eec97a62e7c2212e558aa3b6bc4d925ba Catalin(ux) M. BOIE 2017-07-01 20:21:06
If we get an error when checking the db version, just exit, do not try to do updates. 20a3c8e9fbcadcab05c1a24428b06c7dc6c39f7d Catalin(ux) M. BOIE 2017-06-30 18:56:45
rpm: Forgot to create nginx conf.d folder a2d33471bd782be5aea6ea72f8e21842fc3be07d Catalin(ux) M. BOIE 2017-06-25 10:25:42
Bumped version to 0.69 2411fe5ef068cf6a8b546edcecaac25363755275 Catalin(ux) M. BOIE 2017-06-25 08:20:15
TODO updates 56321b504fdcb1724f590981b29e6731ba0c8607 Catalin(ux) M. BOIE 2017-06-25 08:19:11
tests: switch to nginx; small fixes for the 'log' test 6c75b7de3db4135071155fcaebc4b7220ee966ed Catalin(ux) M. BOIE 2017-06-25 08:18:20
Apache sample config fixes a030309a796a84b99bc9568fe81291305492bf10 Catalin(ux) M. BOIE 2017-06-25 07:59:46
Small text changes 45797dbaf71ec5c922a8ed6e7b9497da64807eb4 Catalin(ux) M. BOIE 2017-06-25 07:58:25
tests: added a test with 500 10k commits ad3ce91ff291b9537ceca11995268e45a17407ef Catalin(ux) M. BOIE 2017-06-25 07:57:37
css: added warning_text class 17a1930f1661392629f3787cdd0150e971496512 Catalin(ux) M. BOIE 2017-06-25 07:56:48
web: the jump to a file did not work because of a wrong anchor bbb95d3a79ea686b3c145b532d072fc19c034297 Catalin(ux) M. BOIE 2017-06-25 07:53:52
css: when diff is too big, show it inline not as a ugly block 9fff8e0248793fc7a2d1346dc8af7ba1aa2fb7ea Catalin(ux) M. BOIE 2017-06-25 07:50:58
Small fixes to the 'download' section documentation a19ca599f6e6ec064952cc1d8f9ea3edd7947254 Catalin(ux) M. BOIE 2017-06-25 07:50:11
Fixes for base_url: did not work for docker (bad switch to https) 4aee622d5e845a9e308f7277af1a1b612fc0c173 Catalin(ux) M. BOIE 2017-06-25 07:49:17
Fixed the commit show page (showing multiple commits) 3e932d79f05be2593cb4c62a58cc0f98704ba5d7 Catalin(ux) M. BOIE 2017-06-25 07:48:21
nginx preparations in .spec file and remove hard dependency on a web server 9aac8ca0a8cb26da4552b9e55f1d4d6b3a4a5d14 Catalin(ux) M. BOIE 2017-06-25 07:46:46
compare: added 'LDAP groups' item and 'Product distribution/evaluation' category ee0b6e752dd575ca1f2b94b7d1c9156db89e40c7 Catalin(ux) M. BOIE 2017-06-25 07:44:45
Improved the installation documentation (add added nginx) 7282afb958acad6e7a4399442b306df59a9b02c0 Catalin(ux) M. BOIE 2017-06-25 07:43:15
Docker fixes 16b1c0adb4518db3a1498c1e30d5a409b692b2bb Catalin(ux) M. BOIE 2017-06-25 07:36:09
Commit 8f182423103c8fc2a4be10840b08be0564e2c814 - tests: fixed wh_http - time race closed
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-07-02 07:01
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-07-02 07:01
Parent(s): 65af692eec97a62e7c2212e558aa3b6bc4d925ba
Signer:
Signing key:
Signing status: N
Tree: a01ff9317eccf31111e29076d6af5ed924d3b475
File Lines added Lines deleted
tests/wh-helper.sh 6 4
tests/wh-stunnel.conf 2 2
tests/wh_http.php 23 11
File tests/wh-helper.sh changed (mode: 100755) (index 9bfb8e9..a7c05bc)
1 1 #!/bin/bash #!/bin/bash
2 2
3 echo "HTTP/1.1 200 OK"
4 echo "Content-Length: 3"
5 echo ""
6 echo -n "OK!"
3 read req
4
5 echo -n -e "HTTP/1.1 200 OK\r\n"
6 echo -n -e "Content-Length: 4\r\n"
7 echo -n -e "\r\n"
8 echo "OK!"
File tests/wh-stunnel.conf changed (mode: 100644) (index 8fce8b8..55cacb6)
... ... log = overwrite
3 3 CAfile = ca/wh/certs/cacert.pem CAfile = ca/wh/certs/cacert.pem
4 4 cert = ca/wh/certs/localhost.pem cert = ca/wh/certs/localhost.pem
5 5 key = ca/wh/private/localhost.key key = ca/wh/private/localhost.key
6 output = wh-stunnel-@@id@@.log
6 output = @@cwd@@/wh-stunnel-@@id@@.log
7 7 foreground = yes foreground = yes
8 exec = ./wh-helper.sh
8 exec = @@cwd@@/wh-helper.sh
9 9 syslog = no syslog = no
10 10 socket = a:SO_REUSEADDR=yes socket = a:SO_REUSEADDR=yes
11 11
File tests/wh_http.php changed (mode: 100644) (index 5aa4f88..08db757)
... ... rg_log('port1=' . $port1 . ' port2=' . $port2 . ' port3=' . $port3);
27 27
28 28 function clean() function clean()
29 29 { {
30 rg_exec('fuser -k -9 wh-stunnel-1.log', '', FALSE, FALSE);
31 rg_exec('fuser -k -9 wh-stunnel-2.log', '', FALSE, FALSE);
32 rg_exec('fuser -k -9 wh-stunnel-3.log', '', FALSE, FALSE);
33
34 @unlink('wh-stunnel.conf-1.tmp');
35 @unlink('wh-stunnel.conf-2.tmp');
36 @unlink('wh-stunnel.conf-3.tmp');
30 rg_log_enter('clean');
31 for ($id = 1; $id <= 3; $id++) {
32 rg_exec('fuser -k -9 wh-stunnel-' . $id . '.log', '', FALSE, FALSE);
33 @unlink('wh-stunnel.conf-' . $id . '.tmp');
34 }
35 rg_log_exit();
37 36 } }
38 register_shutdown_function('clean');
39 37
40 38 prepare_http(); prepare_http();
41 39
 
... ... if ($x === FALSE) {
60 58 $y = str_replace('@@port@@', $port1, $x); $y = str_replace('@@port@@', $port1, $x);
61 59 $y = str_replace('@@verify@@', '2', $y); $y = str_replace('@@verify@@', '2', $y);
62 60 $y = str_replace('@@id@@', '1', $y); $y = str_replace('@@id@@', '1', $y);
61 $y = str_replace('@@cwd@@', __DIR__, $y);
63 62 file_put_contents('wh-stunnel.conf-1.tmp', $y); file_put_contents('wh-stunnel.conf-1.tmp', $y);
64 63
65 64 $y = str_replace('@@port@@', $port2, $x); $y = str_replace('@@port@@', $port2, $x);
66 65 $y = str_replace('@@verify@@', '2', $y); $y = str_replace('@@verify@@', '2', $y);
67 66 $y = str_replace('@@id@@', '2', $y); $y = str_replace('@@id@@', '2', $y);
67 $y = str_replace('@@cwd@@', __DIR__, $y);
68 68 file_put_contents('wh-stunnel.conf-2.tmp', $y); file_put_contents('wh-stunnel.conf-2.tmp', $y);
69 69
70 70 $y = str_replace('@@port@@', $port3, $x); $y = str_replace('@@port@@', $port3, $x);
71 71 $y = str_replace('@@verify@@', '0', $y); $y = str_replace('@@verify@@', '0', $y);
72 72 $y = str_replace('@@id@@', '3', $y); $y = str_replace('@@id@@', '3', $y);
73 $y = str_replace('@@cwd@@', __DIR__, $y);
73 74 file_put_contents('wh-stunnel.conf-3.tmp', $y); file_put_contents('wh-stunnel.conf-3.tmp', $y);
74 75
75 76
 
... ... if ($pid == 0) { //child
115 116 rg_log('Started stunnel with pid ' . $pid); rg_log('Started stunnel with pid ' . $pid);
116 117
117 118
119 register_shutdown_function('clean');
120
118 121 rg_log(''); rg_log('');
119 122 rg_log("Creating a user..."); rg_log("Creating a user...");
120 123 rg_test_create_user($db, $rg_ui); rg_test_create_user($db, $rg_ui);
 
... ... rg_test_create_repo($db, $rg_ui, $repo);
225 228
226 229
227 230 rg_log(''); rg_log('');
228 rg_log('Testing if the curl posted with success (wh1)');
231 rg_log('Testing if the curl posted with success (wh1) (should not work)');
229 232 for ($i = 0; $i < 10; $i++) { for ($i = 0; $i < 10; $i++) {
230 233 $r = rg_cache_get($key1 . '::' . $wh_id1); $r = rg_cache_get($key1 . '::' . $wh_id1);
231 234 rg_log_ml('cache: ' . $r); rg_log_ml('cache: ' . $r);
 
... ... if ($r === FALSE) {
238 241 exit(1); exit(1);
239 242 } }
240 243 if (strcmp($r, "BAD") != 0) { if (strcmp($r, "BAD") != 0) {
244 $_k = 'wh::' . $rg_ui['uid'] . '::list::' . $wh_id1 . '::last_output';
245 $_e = rg_cache_get($_k);
241 246 rg_log('Seems wh1 executed correctly without client' rg_log('Seems wh1 executed correctly without client'
242 247 . ' cert (r=' . $r . ')!'); . ' cert (r=' . $r . ')!');
248 rg_log_ml($_e);
243 249 exit(1); exit(1);
244 250 } }
245 251
246 252
247 253 rg_log(''); rg_log('');
248 rg_log('Testing if the curl posted with success (wh2)');
254 rg_log('Testing if the curl posted with success (wh2) (should work)');
249 255 for ($i = 0; $i < 10; $i++) { for ($i = 0; $i < 10; $i++) {
250 256 $r = rg_cache_get($key2 . '::' . $wh_id2); $r = rg_cache_get($key2 . '::' . $wh_id2);
251 257 rg_log_ml('cache: ' . print_r($r, TRUE)); rg_log_ml('cache: ' . print_r($r, TRUE));
 
... ... for ($i = 0; $i < 10; $i++) {
254 260 sleep(1); sleep(1);
255 261 } }
256 262 if (strcmp($r, "OK") != 0) { if (strcmp($r, "OK") != 0) {
263 $_k = 'wh::' . $rg_ui['uid'] . '::list::' . $wh_id2 . '::last_output';
264 $_e = rg_cache_get($_k);
257 265 rg_log('Seems wh2 did not returned success' rg_log('Seems wh2 did not returned success'
258 266 . ' (r=' . $r . ')!'); . ' (r=' . $r . ')!');
267 rg_log_ml($_e);
259 268 exit(1); exit(1);
260 269 } }
261 270
262 271
263 272 rg_log(''); rg_log('');
264 rg_log('Testing if the curl posted with success (wh3)');
273 rg_log('Testing if the curl posted with success (wh3) (should work)');
265 274 for ($i = 0; $i < 10; $i++) { for ($i = 0; $i < 10; $i++) {
266 275 $r = rg_cache_get($key3 . '::' . $wh_id3); $r = rg_cache_get($key3 . '::' . $wh_id3);
267 276 rg_log_ml('cache: ' . print_r($r, TRUE)); rg_log_ml('cache: ' . print_r($r, TRUE));
 
... ... for ($i = 0; $i < 10; $i++) {
270 279 sleep(1); sleep(1);
271 280 } }
272 281 if (strcmp($r, "OK") != 0) { if (strcmp($r, "OK") != 0) {
282 $_k = 'wh::' . $rg_ui['uid'] . '::list::' . $wh_id3 . '::last_output';
283 $_e = rg_cache_get($_k);
273 284 rg_log('Seems wh3 did not returned success' rg_log('Seems wh3 did not returned success'
274 285 . ' (r=' . $r . ')!'); . ' (r=' . $r . ')!');
286 rg_log_ml($_e);
275 287 exit(1); exit(1);
276 288 } }
277 289
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main