tempesta-tech / tempesta-test

Test suite for Tempesta FW
11 stars 4 forks source link

Tests for configuration variables in custom redirects. #221

Closed nickzaev closed 2 years ago

nickzaev commented 2 years ago

Added tests according to #214's description and disabled a test for an abstract base class. As for now with Tempesta from this branch:

root@nick-vm:~/tempesta-test# ./run_tests.py http_rules.test_http_tables
...
----------------------------------------------------------------------
Running functional tests...
----------------------------------------------------------------------

.s..........F....
======================================================================
FAIL: test_chains (http_rules.test_http_tables.HttpTablesTestMarkRules)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/http_rules/test_http_tables.py", line 373, in test_chains
    self.process(self.get_client(i),
  File "/root/tempesta-test/http_rules/test_http_tables.py", line 312, in process
    self.assertEqual(server.last_request, chain.fwd_request)
AssertionError: None != <helpers.deproxy.Request object at 0x7f27125ece50>

----------------------------------------------------------------------
Ran 17 tests in 59.317s

FAILED (failures=1, skipped=1)

http_rules.test_http_tables.HttpTablesTestMarkRules is out of the scope of this PR, but if there's any hints on how that test can be easily fixed, I could do that too.

const-t commented 2 years ago

if I correct, following code at line 162:

        mark == 1 -> vh7;
        mark == 2 -> vh6;
        mark == 3 -> vh5;
        mark == 4 -> vh4;
        mark == 5 -> vh3;
        mark == 6 -> vh2;
        mark == 7 -> vh1;

must be replaced by this:

        mark == 1 -> vh8;
        mark == 2 -> vh7;
        mark == 3 -> vh6;
        mark == 4 -> vh5;
        mark == 5 -> vh4;
        mark == 6 -> vh3;
        mark == 7 -> vh2;
        mark == 8 -> vh1;

Need to check.