-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Avoid to use ENV:TERM in the regression tests. #1969
Comments
Changes was changed accordingly. |
Sorry to tell you, but building of ModSecurity v.3.0.3 in sbuild is failed:
When I make the package in native shell, then tests successfully finished:
This issue affects only ModSecurity v3.0.3, from releases page. To track the issue is very hard in sbuild environment - do you have any idea, what do I need to see? |
Solved - the pkg-config package is needed to build, and sbuild doesn't contain it by default. Sorry. |
A while ago there was a discussion on the developer and packagers mailing lists [1] [2] about the utilization of the environment variable TERM as part of a regression test. The objective of the test was to certify that ModSecurity was capable to read environment vars via the ENV variable.
Turns out, TERM wasn't a good variable as it is not set is some use cases, for instance, while generating packages in a build environment, leading the tests to fail.
In order to circumvent the problem @airween suggested to set the variable before start the test process, which was indeed a very good idea. However, it was still possible that other persons hit the same problem. Occasionally @inittab bought up the discussion again, because he hit the same problem as @ariween.
To have a more wide solution the ENV test case was changed to read a variable that is set by the regression test client. That way nobody will face this problem again :)
Test case:
https://github.com/SpiderLabs/ModSecurity/blob/25bb1f1bcc7252e93bd42067cac23a07b71fb8b9/test/test-cases/regression/variable-ENV.json#L46-L89
Change in the regression utility:
https://github.com/SpiderLabs/ModSecurity/blob/25bb1f1bcc7252e93bd42067cac23a07b71fb8b9/test/regression/regression.cc#L428-L431
In addition a new test case was created using setenv action:
https://github.com/SpiderLabs/ModSecurity/blob/25bb1f1bcc7252e93bd42067cac23a07b71fb8b9/test/test-cases/regression/variable-ENV.json#L90-L134
The text was updated successfully, but these errors were encountered: