clixon/test
Olof hagsand e7b60619da * Pushed tag to 4.0.1.PRE
* Restconf RFC 8040 increased feature compliance
  * Cache-Control: no-cache added in HTTP responses (RFC Section 5.5)
  * Restconf monitoring capabilities (RFC Section 9.1)
* Added support for Yang extensions
  * New plugin callback: ca_extension
  * Main backend example includes example code on how to implement a Yang extension in a plugin.
* JSON changes
  * Non-pretty-print output removed all extra spaces.
    * Example: `{"nacm-example:x": 42}` --> {"nacm-example:x":42}`
  * Empty JSON container changed from `null` to `{}`.
    * Empty list and leafs remain as `null`
* Removed unnecessary configure dependencies
  * libnsl, libcrypt, libm, if_vlan,...
* pseudo-plugin added, to enable callbacks also for main programs. Useful for extensions
* Yang Unique statements with multiple schema identifiers did not work on some platforms due to memory error.
2019-07-23 22:11:14 +02:00
..
jenkins Added make test and travis experiment 2019-02-04 14:13:20 +01:00
travis Travis container tests 2019-02-11 16:10:43 +01:00
all.sh * Error messages for invalid number ranges and string lengths have been uniformed and changed. 2019-06-20 13:59:55 +02:00
lib.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
long.sh zero-copy mem error; preparing for 4.0 2019-07-12 17:00:46 +02:00
Makefile.in docker base and system images, and trigger docker test from travis. 2019-02-11 15:47:12 +01:00
mem.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
nacm.sh * NACM extension (RFC8341) 2018-12-16 19:49:19 +01:00
plot_perf.sh startup measurements: test, plot and report 2019-04-23 11:57:18 +02:00
README.md * Optimized validation of large lists 2019-04-14 14:36:41 +02:00
sum.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_augment.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_choice.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_cli.sh The Clixon API has been extended with namespaces, or namespace contexts in the following cases: 2019-07-08 10:36:37 +02:00
test_cli_history.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_copy_config.sh * Restconf with startup feature will now copy all edit changes to startup db (as it should according to RFC 8040) 2019-04-26 12:12:55 +02:00
test_datastore.sh * Regexp improvements 2019-05-20 16:03:29 +02:00
test_feature.sh Merge branch 'master' of https://github.com/clicon/clixon. 2019-07-08 14:47:18 +02:00
test_identity.sh Replaced strchr with nodeid_split 2019-07-10 17:18:34 +02:00
test_insert.sh Merge branch 'master' of https://github.com/clicon/clixon. 2019-07-08 14:47:18 +02:00
test_install.sh * Removed all dependency on strverscmp 2019-02-27 10:46:05 +01:00
test_json.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_leafref.sh Merge branch 'master' of https://github.com/clicon/clixon. 2019-07-08 14:47:18 +02:00
test_minmax.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_nacm.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_nacm_default.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_nacm_ext.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_nacm_module_read.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_nacm_module_write.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_nacm_protocol.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_netconf.sh The Clixon API has been extended with namespaces, or namespace contexts in the following cases: 2019-07-08 10:36:37 +02:00
test_openconfig.sh Clixon release 4.0.0 2019-07-13 16:33:23 +02:00
test_order.sh Merge branch 'master' of https://github.com/clicon/clixon. 2019-07-08 14:47:18 +02:00
test_pattern.sh Added support for inverted regexps 2019-05-29 14:39:36 +02:00
test_perf.sh The Clixon API has been extended with namespaces, or namespace contexts in the following cases: 2019-07-08 10:36:37 +02:00
test_perf_startup.sh * Regexp improvements 2019-05-20 16:03:29 +02:00
test_perf_state.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf2.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf_err.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf_jukebox.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf_listkey.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_restconf_startup.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_rpc.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_startup.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_stream.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_submodule.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_transaction.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_type.sh zero-copy mem error; preparing for 4.0 2019-07-12 17:00:46 +02:00
test_type_range.sh range test 2019-06-25 16:55:32 +02:00
test_union.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_unique.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_upgrade.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_upgrade_auto.sh Merge branch 'master' of https://github.com/clicon/clixon. 2019-07-08 14:47:18 +02:00
test_upgrade_interfaces.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_upgrade_repair.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_when_must.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_xml.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_xpath.sh The Clixon API has been extended with namespaces, or namespace contexts in the following cases: 2019-07-08 10:36:37 +02:00
test_yang.sh Clixon release 4.0.0 2019-07-13 16:33:23 +02:00
test_yang_extension.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
test_yang_load.sh test scripts: replaced sleeps with wait functions 2019-07-01 10:32:48 +02:00
test_yang_models.sh Clixon release 4.0.0 2019-07-13 16:33:23 +02:00
test_yang_namespace.sh * Pushed tag to 4.0.1.PRE 2019-07-23 22:11:14 +02:00
valgrind-clixon.supp Revert "Revert "* Added valgrind memory leak tests in testmem.sh for restconf"" 2019-02-20 16:25:42 +01:00

Clixon tests and CI

Overview

Tests called 'test_*.sh' and placed in this directory will be 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 to get the idea.

See also the site.sh for example for skipping tests or setting some site-specific variables.

Continuous Integration

CI is done via Travis CI.

In the CI process, the system is built and configured and then the clixon test container is built and the tests in this directory is executed.

Getting started

You need to build and install the clixon utility programs before running the tests as some of the tests rely on them:

  cd util
  make
  sudo make install

You need to configure and start nginx for the restconf tests:

  • The example has instructions on how to edit your nginx config files
  • If you run systemd: sudo systemctl start nginx.service

You may need to install the time utility (/usr/bin/time).

Prefix variable

You can prefix a test with BE=0 if you want to run your own backend.

To run with debug flags, use the DBG=<number> environment variable.

Other variables include:

  • RCWAIT Number of seconds to sleep after daemons have started

Run all tests

You can run an individual test by itself, or run through all tests matching 'test_*.sh' in the directory. Prints test output and stops on first error:

  all.sh

Run all tests but continue after errors and only print a summary test output identifying which tests succeeded and which failed:

  sum.sh

Memory leak test

The mem.sh runs memory checks using valgrind. Start it with no arguments to test all components (backend, restconf, cli, netconf), or specify which components to run:

  mem.sh                  # All components
  mem.sh restconf backend # Only backend and cli

Performance plots

The script plot_perf.sh produces gnuplots for some testcases.

Site.sh

You may add your site-specific modifications in a site.sh file. Example:

  # Add your local site specific env variables (or tests) here.
  # Add test to this list that you dont want run
  SKIPLIST="test_openconfig.sh test_yangmodels.sh"
  # Parse yang openconfig models from https://github.com/openconfig/public
  OPENCONFIG=/usr/local/share/openconfig/public
  # Parse yangmodels from https://github.com/YangModels/yang
  YANGMODELS=/usr/local/share/yangmodels
  # Standard IETF RFC yang files. 
  IETFRFC=$YANGMODELS/standard/ietf/RFC