List of commits:
Subject Hash Author Date (UTC)
Added functional test for HTTP 304 code 93205ec14d1073c434360abf7ea525a75407b1ab Catalin(ux) M. BOIE 2020-04-02 14:05:49
Lots of changes all over the place 3ddbd9e686f514eed1e715d7702a910ca3f8b22c Catalin(ux) M. BOIE 2020-04-01 07:17:57
More tests updates d5d45ace725f6ab336998a328136a2f7f9474df1 Catalin(ux) M. BOIE 2020-04-01 05:30:54
Lots of tests updates 183c4af52e56ae4e4fd74a35e2b17ac79952aec6 Catalin(ux) M. BOIE 2020-03-20 16:10:33
Improved a little bit the mail reporting for admin 576f96d554b1e273391ac54404bf5f885325e5e8 Catalin(ux) M. BOIE 2020-03-03 19:25:17
Worker and builder big changes 90f596e4fd8fa291b1da831bce609b486c7a5875 Catalin(ux) M. BOIE 2020-01-06 13:31:20
Samples update (switch to systemd services for builder and worker) 8bfde1fb79778d024350bf5d75f076fb5e178512 Catalin(ux) M. BOIE 2020-01-06 12:50:21
builder: show queue in the web page 6cab7820b0bd2622afb77391a9e9515e0e837eef Catalin(ux) M. BOIE 2020-01-06 12:49:26
totp: Allow also years for 'val' command d666df0cec948f938469b9eb12a1b981cb41cfa1 Catalin(ux) M. BOIE 2020-01-04 14:39:33
worker: change git clone parameters because we could not clone 8eb2727ac17e12e148f39c72e1f4bd1e31319b33 Catalin(ux) M. BOIE 2019-12-19 03:34:26
Added a TODO for worker 492fb4546829f53adacd74c4647c3634f7c37065 Catalin(ux) M. BOIE 2019-12-18 22:23:12
worker improvements 4387b00291b5848aa08c303f9d62a126a6806a35 Catalin(ux) M. BOIE 2019-12-18 22:17:23
.spec: require tidy for building the tests c0deab2ce24388c91d2bc2e96338a260c9657dd6 Catalin(ux) M. BOIE 2019-12-18 22:15:29
nginx configuration update 015c9404229f2ff7fb91cc57ab21289f01878334 Catalin(ux) M. BOIE 2019-12-18 21:55:13
Added Business model to comparison c62d466580aca0ff3371f3ba369959c7ef7631d0 Catalin(ux) M. BOIE 2019-11-21 20:44:16
CSS small correction ded9ef6bce5bebfa815bc7ae5733bc8e0810af3b Catalin(ux) M. BOIE 2019-11-21 18:20:41
Added LDAP/qrencode to features/thanks pages d269d59787f61045f5831c6985899c28da08ebeb Catalin(ux) M. BOIE 2019-11-21 18:20:22
Invalidate slave table cache when updating the db structure, else new slaves will not be created 8e1bf7feeb87818179e7152a356e0f408da706f2 Catalin(ux) M. BOIE 2019-11-19 19:33:15
docker: push also the latest label a72e2e74355d772ae45bb99798ad47082390943c Catalin(ux) M. BOIE 2019-11-19 19:32:11
More statistics changes (load, cpu, mem) e7f38e72405a227788a7011ea17dd57d0d4de67c Catalin(ux) M. BOIE 2019-11-19 19:31:24
Commit 93205ec14d1073c434360abf7ea525a75407b1ab - Added functional test for HTTP 304 code
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-04-02 14:05
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-04-02 14:05
Parent(s): 3ddbd9e686f514eed1e715d7702a910ca3f8b22c
Signing key:
Tree: 95a09a2ec9768ce4c7dac8da281c6a4635b5bb09
File Lines added Lines deleted
tests/_run_tests.sh 1 1
tests/http.inc.php 4 3
tests/http_304.php 57 0
tests/http_top.php 1 1
File tests/_run_tests.sh changed (mode: 100755) (index 2fe3980..19e50dd)
2 2
3 3 . ./env.txt . ./env.txt
4 4
5 tests="ldap_core ldap \
5 tests="http_304 ldap_core ldap \
6 6 admin_set_web git_big_push admin_set_git by_http wh_lambda http_keys \ admin_set_web git_big_push admin_set_git by_http wh_lambda http_keys \
7 7 http_forgot \ http_forgot \
8 8 api wh_cloud pr_anon wh_http ssh http_totp totp git_log1 \ api wh_cloud pr_anon wh_http ssh http_totp totp git_log1 \
File tests/http.inc.php changed (mode: 100644) (index a512475..d004130)
... ... function prepare_http()
30 30 /* /*
31 31 * Data is an array * Data is an array
32 32 */ */
33 $http_handles = array();
34 33 function do_req($url, &$data, &$headers) function do_req($url, &$data, &$headers)
35 34 { {
36 35 global $test_ua, $test_referer; global $test_ua, $test_referer;
37 36 global $cookie_jar; global $cookie_jar;
38 global $http_handles;
37 static $http_handles = array();
39 38 global $http_client; global $http_client;
40 39 global $_testns; global $_testns;
40 global $rg_log_sid;
41 41
42 42 if (!isset($http_client)) if (!isset($http_client))
43 43 $http_client = $_testns; $http_client = $_testns;
 
... ... function do_req($url, &$data, &$headers)
60 60 else else
61 61 $url .= '&rg_debug=1'; $url .= '&rg_debug=1';
62 62 $url .= '&tid=' . rg_id(10); // to easy identify requests in the logs $url .= '&tid=' . rg_id(10); // to easy identify requests in the logs
63 $url .= '&_testns=' . $_testns;
64 $url .= '&rg_log_sid=' . $rg_log_sid;
63 65
64 66 rg_log_ml("do_req url[$url] data=" . print_r($data, TRUE) rg_log_ml("do_req url[$url] data=" . print_r($data, TRUE)
65 67 . "headers=" . print_r($headers, TRUE)); . "headers=" . print_r($headers, TRUE));
 
... ... function do_req($url, &$data, &$headers)
78 80 curl_setopt($c, CURLOPT_POSTFIELDS, $data); curl_setopt($c, CURLOPT_POSTFIELDS, $data);
79 81 } else { } else {
80 82 curl_setopt($c, CURLOPT_POST, 0); curl_setopt($c, CURLOPT_POST, 0);
81 curl_setopt($c, CURLOPT_POSTFIELDS, '');
82 83 } }
83 84 curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);
84 85 curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
File tests/http_304.php added (mode: 100644) (index 0000000..4d5f026)
1 <?php
2 error_reporting(E_ALL | E_STRICT);
3 ini_set('track_errors', 'On');
4
5 $rg_cache_debug = TRUE;
6 $test_normal = TRUE;
7
8 $INC = dirname(__FILE__) . '/../inc';
9 require_once(dirname(__FILE__) . '/config.php');
10 require_once($INC . '/init.inc.php');
11 require_once($INC . '/util.inc.php');
12 require_once('helpers.inc.php');
13 require_once('http.inc.php');
14
15 rg_log_set_file('http_304.log');
16
17 require_once('common.php');
18
19 $_testns = 'http_304';
20
21 prepare_http();
22
23 rg_log('');
24 rg_log_enter('Loading main page...');
25 $data = array(); $headers = array();
26 $r = do_req($test_url . '/', $data, $headers);
27 if (!stristr($r['header'], 'Content-Encoding: gzip')) {
28 rg_log_ml('headers: ' . print_r($r['header'], TRUE));
29 rg_log('Content is not compressed!');
30 exit(1);
31 }
32 if (!stristr($r['header'], "\n" . 'ETag: ')) {
33 rg_log_ml('headers: ' . print_r($r['header'], TRUE));
34 rg_log('ETag is not present!');
35 exit(1);
36 }
37 rg_log_ml('Headers: ' . print_r($r['header'], TRUE));
38 $x = explode("\nETag: ", $r['header'], 2);
39 $y = explode("\n", $x[1], 2);
40 $etag = trim($y[0]);
41 rg_log_exit();
42
43
44 rg_log('');
45 rg_log_enter('Loading main page...');
46 $data = array(); $headers = array('If-None-Match: ' . $etag);
47 $r = do_req($test_url . '/', $data, $headers);
48 $x = explode("\n", $r['header'], 2);
49 $x = trim($x[0]);
50 if (!strstr($x, ' 304 ')) {
51 rg_log_ml('headers: ' . print_r($r['header'], TRUE));
52 rg_log('We did not got 304 answer (but [' . $x . '])!');
53 exit(1);
54 }
55 rg_log_exit();
56
57 rg_log('OK!');
File tests/http_top.php changed (mode: 100644) (index c3613a8..c126695)
... ... $_list = array("features", "discover", "download", "pricing", "tos",
27 27 foreach ($_list as $op) { foreach ($_list as $op) {
28 28 rg_log("Loading $op page..."); rg_log("Loading $op page...");
29 29 $data = array(); $data = array();
30 $r = do_req($test_url . "/op/$op?t=http_top", $data, $headers);
30 $r = do_req($test_url . '/op/' . $op, $data, $headers);
31 31 } }
32 32
33 33 rg_log("OK!"); rg_log("OK!");
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