Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for configuration variables in custom redirects. #221

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Conversation

nickzaev
Copy link
Contributor

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.

@nickzaev nickzaev self-assigned this May 24, 2022
@nickzaev nickzaev linked an issue May 24, 2022 that may be closed by this pull request
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good except one possible improvement.

However, #220 masks a lot of tests and the whole http_rules, so could you please fix the rest of http_rules tests in separate commits?

At this moment it's hard to say what's wrong with HttpTablesTestMarkRules - need to research the issue.

http_rules/test_http_tables.py Outdated Show resolved Hide resolved
@const-t
Copy link
Contributor

const-t commented May 28, 2022

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.

@krizhanovsky krizhanovsky requested review from pale-emperor and removed request for avbelov23 June 20, 2022 14:48
@nickzaev nickzaev removed the request for review from pale-emperor June 24, 2022 20:47
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nickzaev nickzaev merged commit 2401abd into master Jun 24, 2022
@nickzaev nickzaev deleted the nz-214 branch June 24, 2022 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom HTTP redirects
3 participants