clixon/test
2019-04-02 11:01:01 +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 * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
lib.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
long.sh xpath parser scan strings instead of characters 2019-04-02 11:01:01 +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 xpath parser scan strings instead of characters 2019-04-02 11:01:01 +02:00
nacm.sh * NACM extension (RFC8341) 2018-12-16 19:49:19 +01:00
plot_perf.sh time vs /usr/bin/time in travis docker test script problems 2019-02-11 16:21:07 +01:00
README.md mem.sh with more than one target 2019-03-28 21:57:28 +01:00
sum.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_augment.sh forgot exit in testcase 2019-03-06 10:37:01 +01:00
test_choice.sh Bugfix: [Nodes from more than one of the choice's branches exist at the same time](https://github.com/clicon/clixon/issues/81) 2019-03-14 16:33:10 +01:00
test_cli.sh * CLI history: [Preserve CLI command history across sessions. The up/down arrows](https://github.com/clicon/clixon/issues/79) 2019-03-08 11:26:07 +01:00
test_cli_history.sh * CLI history: [Preserve CLI command history across sessions. The up/down arrows](https://github.com/clicon/clixon/issues/79) 2019-03-08 11:26:07 +01:00
test_copy_config.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_datastore.sh * Structural change: removed datastore plugin and directory, and merged into regulat clixon lib code. 2019-03-31 18:17:40 +02:00
test_feature.sh upgrade example and test 2019-03-27 18:04:01 +01:00
test_identity.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_install.sh * Removed all dependency on strverscmp 2019-02-27 10:46:05 +01:00
test_json.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_leafref.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_list.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_nacm.sh Bugfix: Default NACM policies applied even if NACM is disabled 2019-03-13 11:35:11 +01:00
test_nacm_ext.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_nacm_module_read.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_nacm_module_write.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_nacm_protocol.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_netconf.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_openconfig.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_order.sh mem-leak 2019-03-25 11:26:57 +01:00
test_perf.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_restconf.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_restconf2.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_rpc.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_startup.sh Changed (startup) running mode so that startup_db is not overwritten. 2019-03-12 09:56:09 +01:00
test_stream.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_type.sh * New yang changelog experimental feature for automatic upgrade 2019-03-21 18:05:55 +01:00
test_union.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_upgrade.sh ordering problems 2019-03-18 21:59:41 +01:00
test_upgrade_auto.sh * Added xml_wrap function that adds an XML node above a node as a wrapper 2019-03-27 16:04:14 +01:00
test_upgrade_interfaces.sh more upgrade-interfaces test cases 2019-03-28 10:56:53 +01:00
test_upgrade_repair.sh * New yang changelog experimental feature for automatic upgrade 2019-03-21 18:05:55 +01:00
test_when_must.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_xml.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_xpath.sh * New yang changelog experimental feature for automatic upgrade 2019-03-21 18:05:55 +01:00
test_yang.sh * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced. 2019-03-06 09:42:55 +01:00
test_yang_load.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_yang_namespace.sh * Added flags to example backend to control its behaviour: 2019-03-18 16:31:34 +01:00
test_yangmodels.sh xpath parser scan strings instead of characters 2019-04-02 11:01:01 +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 start nginx for some of the text. There are instructions in

  • If you run systemd: sudo systemctl start nginx.service
  • The example has instructions

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

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=/home/olof/src/clixon/test/public
  # Parse yangmodels from https://github.com/YangModels/yang
  YANGMODELS=/usr/local/share/yangmodels
  # Standard IETF RFC yang files. 
  IETFRFC=$YANGMODELS/standard/ietf/RFC