Test: Ensured HVER/RCPROTO work as envvars to test and documented it
This commit is contained in:
parent
fa077839f0
commit
e1bec5f6dd
2 changed files with 28 additions and 9 deletions
|
|
@ -1,8 +1,15 @@
|
||||||
# Clixon tests and CI
|
# Clixon Test and CI
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Tests called 'test_*.sh' and placed in this directory will be
|
This directory contains Clixon test suites. Files directly under this
|
||||||
|
directory called `test_*.sh` are part of the regression CI tests.
|
||||||
|
|
||||||
|
There are also sub-directories for various other tests:
|
||||||
|
- cicd - Test scripts for running on remote hosts
|
||||||
|
- fuzz - Fuzzing with [american fuzzy lop](https://github.com/google/AFL/releases)
|
||||||
|
- vagrant - Scripts for booting local vagrant hosts, installing clixon and running clixon tests
|
||||||
|
|
||||||
automatically run as part of the all.sh, sum.sh tests etc. The scripts
|
automatically run as part of the all.sh, sum.sh tests etc. The scripts
|
||||||
need to follow some rules to work properly, please look at one or two
|
need to follow some rules to work properly, please look at one or two
|
||||||
to get the idea.
|
to get the idea.
|
||||||
|
|
@ -31,7 +38,7 @@ To download the openconfig and yang models required for the tests:
|
||||||
|
|
||||||
## Continuous Integration
|
## Continuous Integration
|
||||||
|
|
||||||
CI is done via [Travis CI](https://travis-ci.org/clicon/clixon).
|
CI is done via github actions.
|
||||||
|
|
||||||
In the CI process, the system is built and configured and then the
|
In the CI process, the system is built and configured and then the
|
||||||
[clixon test container](../docker/system) is built and the tests in
|
[clixon test container](../docker/system) is built and the tests in
|
||||||
|
|
@ -39,10 +46,6 @@ this directory is executed.
|
||||||
|
|
||||||
There are also [manual cicd scripts here](cicd/README.md)
|
There are also [manual cicd scripts here](cicd/README.md)
|
||||||
|
|
||||||
## Vagrant
|
|
||||||
|
|
||||||
[Vagrant scripts are here](vagrant/README.md)
|
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
You need to build and install the clixon utility programs before running the tests as some of the tests rely on them:
|
You need to build and install the clixon utility programs before running the tests as some of the tests rely on them:
|
||||||
|
|
@ -62,6 +65,8 @@ You may need to install the `time` utility (`/usr/bin/time`).
|
||||||
|
|
||||||
You can prefix a test with `BE=0` if you want to run your own backend.
|
You can prefix a test with `BE=0` if you want to run your own backend.
|
||||||
|
|
||||||
|
You can prefix a test with `RC=0` if you want to run your own restconf process.
|
||||||
|
|
||||||
To run with debug flags, use the `DBG=<number>` environment variable.
|
To run with debug flags, use the `DBG=<number>` environment variable.
|
||||||
|
|
||||||
Other variables include:
|
Other variables include:
|
||||||
|
|
@ -93,6 +98,16 @@ The above scripts work with the `pattern` variable to limit the scope of which t
|
||||||
pattern="test_c*.sh" mem.sh
|
pattern="test_c*.sh" mem.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## TLS and http/2
|
||||||
|
|
||||||
|
With default configure options, most tests run http/2 and TLS by
|
||||||
|
default. To pin tests to override this use the `HVER` and `RCPROTO` variables. Example:
|
||||||
|
```
|
||||||
|
HVER=1.1 RCPROTO=http ./test_restconf_plain_patch.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Some tests are pinned to certain settings and overriding will not will not work.
|
||||||
|
|
||||||
## Performance plots
|
## Performance plots
|
||||||
|
|
||||||
The script `plot_perf.sh` produces gnuplots for some testcases.
|
The script `plot_perf.sh` produces gnuplots for some testcases.
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,12 @@ DEFAULTHELLO="<?xml version=\"1.0\" encoding=\"UTF-8\"?><hello $DEFAULTNS><capab
|
||||||
: ${CURLOPTS:="-Ssik"}
|
: ${CURLOPTS:="-Ssik"}
|
||||||
# Set HTTP version 1.1 or 2
|
# Set HTTP version 1.1 or 2
|
||||||
if ${HAVE_LIBNGHTTP2}; then
|
if ${HAVE_LIBNGHTTP2}; then
|
||||||
HVER=2
|
: ${HVER:=2}
|
||||||
|
else
|
||||||
|
: ${HVER:=1.1}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${HVER} = 2 ]; then
|
||||||
if ${HAVE_HTTP1}; then
|
if ${HAVE_HTTP1}; then
|
||||||
# This is if http/1 is enabled (unset proto=HTTP_2 in restconf_accept_client)
|
# This is if http/1 is enabled (unset proto=HTTP_2 in restconf_accept_client)
|
||||||
CURLOPTS="${CURLOPTS} --http2"
|
CURLOPTS="${CURLOPTS} --http2"
|
||||||
|
|
@ -112,7 +117,6 @@ if ${HAVE_LIBNGHTTP2}; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
CURLOPTS="${CURLOPTS} --http1.1"
|
CURLOPTS="${CURLOPTS} --http1.1"
|
||||||
HVER=1.1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait after daemons (backend/restconf) start. See mem.sh for valgrind
|
# Wait after daemons (backend/restconf) start. See mem.sh for valgrind
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue