clixon/test
2020-07-02 19:25:48 +02:00
..
cicd skip c++ tests in travis 2020-07-02 18:14:59 +02:00
jenkins Added make test and travis experiment 2019-02-04 14:13:20 +01:00
travis changed cligen repo from olofhagsand/cligen to clicon/cligen 2020-06-21 15:57:43 +02:00
vagrant changed cligen repo from olofhagsand/cligen to clicon/cligen 2020-06-21 15:57:43 +02:00
all.sh test env bash; freebsd config 2019-09-17 22:44:01 +02:00
config.sh.in * Fixed: [Double free when using libxml2 as regex engine #117](https://github.com/clicon/clixon/issues/117) 2020-07-02 13:26:15 +02:00
jukebox.sh test env bash; freebsd config 2019-09-17 22:44:01 +02:00
lib.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
long.sh test script minor modifications 2019-10-20 21:11:13 +02:00
Makefile.in Makefile copyright 2020-05-12 13:59:45 +02:00
mem.sh Adapt to CLIgen 4.6 API changes 2020-05-19 22:26:29 +02:00
nacm.sh test env bash; freebsd config 2019-09-17 22:44:01 +02:00
plot_perf.sh Uniform time cmd in performance tests 2020-02-16 10:23:03 +01:00
README.md Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
sum.sh moved initial hello request from client to backend to immediate before first actual query 2019-10-27 10:24:13 +01:00
test_api.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_api_path.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_augment.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_c++.sh Added const char * in multiple places 2020-07-02 19:25:48 +02:00
test_choice.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_cli.sh Auto-cli updates and sync with clixon-docs 2020-06-15 16:07:04 +02:00
test_cli_apipath.sh * Created two sub-files (clixon_validate.c and clixon_api_path.c) from large lib/src/clixon_xml_map.c source file. 2020-01-01 11:12:54 +01:00
test_cli_gen.sh Auto-cli updates and sync with clixon-docs 2020-06-15 16:07:04 +02:00
test_cli_history.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_cli_multikey.sh test env bash; freebsd config 2019-09-17 22:44:01 +02:00
test_cli_submodes.sh * Bumped version to 4.3.0.PRE 2019-11-03 13:05:50 +01:00
test_copy_config.sh Added option to treat unknown XML (wrt YANG) as anydata. 2020-05-03 22:03:33 +02:00
test_datastore.sh NACM datanode write rules have been changed from looking at datastore being chekend (eg running/candidate/startup) to *only* look at running. 2020-03-12 14:58:30 +01:00
test_datastore_repair.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_feature.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_identity.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_insert.sh * xml_merge() changed to use 3-value return: 1:OK, 0:Yang failed, -1: Error 2020-04-17 15:47:37 +02:00
test_install.sh centos test fixes 2020-06-08 18:48:18 +00:00
test_instance_id.sh * Restconf FCGI (eg via nginx) have changed reply message syntax slightly 2020-06-16 21:51:00 +02:00
test_instance_id_multi.sh * Fixed instance-id multiple results 2020-04-22 14:00:40 +02:00
test_json.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_json_null.sh remove move end transaction 2020-04-03 08:47:48 +02:00
test_leafref.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_leafref_augment.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_leafref_state.sh * Auto-CLI enhancements 2020-06-13 12:05:26 +02:00
test_minmax.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_nacm.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_credentials.sh centos test fixes 2020-06-08 18:48:18 +00:00
test_nacm_datanode.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_datanode_read.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_datanode_write.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_default.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_ext.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_nacm_module_read.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_nacm_module_write.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_nacm_protocol.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_netconf.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_netconf_filter.sh [filter in netconf - one specific entry #100](https://github.com/clicon/clixon/issues/100) 2019-12-07 18:10:19 +01:00
test_netconf_whitespace.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_openconfig.sh * Explicit search indexes 2020-02-28 12:16:16 +01:00
test_order.sh Clixon 4.4 three compile-time options: MOVE_TRANS_END for changing transaction-end callbacks; STATE_ORDERED_BY_SYSTEM to make state data system ordered; XML_MERGE_TWO_ROUNDS to improve xml_merge performance. 2020-04-02 14:28:58 +02:00
test_pattern.sh * Fixed: [Double free when using libxml2 as regex engine #117](https://github.com/clicon/clixon/issues/117) 2020-07-02 13:26:15 +02:00
test_perf.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_perf_mem.sh mem test issues with set variables between tests 2020-05-11 14:37:13 +00:00
test_perf_startup.sh * Optimized prefix checks at xml parse time: using many prefixes slowed down parsing considerably 2020-04-29 23:11:48 +02:00
test_perf_state.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_perf_state_only.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_perf_xml.sh * Optimizations 2020-04-28 22:31:58 +02:00
test_privileges.sh test kill valgrind process after run 2019-12-09 21:12:39 +01:00
test_restconf.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf2.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf_err.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf_jukebox.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf_listkey.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf_patch.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_restconf_startup.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_rpc.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_search_index.sh minor things for clixon.4.4 2020-03-27 11:20:35 +01:00
test_sock.sh * Session-id CLI functionality delayed: "lazy evaluation" 2020-02-05 15:37:25 +01:00
test_ssl_certs.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_startup.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_stream.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_submodule.sh Fixed ssl client certs for evhtp. 2020-07-01 15:11:22 +02:00
test_transaction.sh mem test issues with set variables between tests 2020-05-11 14:37:13 +00:00
test_transaction_restart.sh mem test issues with set variables between tests 2020-05-11 14:37:13 +00:00
test_type.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_type_range.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_union.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_unique.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_upgrade_auto.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_upgrade_failsafe.sh Added http support for evhtp (not only https) 2020-06-29 14:41:08 +02:00
test_upgrade_interfaces.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_upgrade_module.sh clear test dir 2020-06-27 13:33:13 +02:00
test_upgrade_repair.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +02:00
test_upgrade_simple.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_when_must.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_with_default.sh * Fixed: Datastore read on startup got fixed default values. 2020-03-13 14:49:37 +01:00
test_xml.sh Empty values in JSON has changed to comply to RFC 7951 2020-03-07 17:15:59 +01:00
test_xml_trees.sh * Experimental optimzations of yang-bind and sort for large lists 2020-05-01 17:08:32 +02:00
test_xml_validate.sh undef state path bypass 2020-05-04 13:35:04 +02:00
test_xpath.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_xpath_canonical.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_yang.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_yang_bind.sh * New "general-purpose" datastore upgrade callback added which i called once on startup, intended for lo 2020-02-20 14:00:01 +01:00
test_yang_default.sh readd namespace cache 2020-03-30 22:07:46 +02:00
test_yang_extension.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_yang_load.sh Very large commit for upcoming 4.4 release 2020-02-02 15:52:30 +01:00
test_yang_models.sh Sanity check of mandatory key statement for Yang LISTs. 2020-03-09 15:48:33 +01:00
test_yang_namespace.sh Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc 2020-06-21 15:49:46 +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.

There are also manual cicd scripts here

Vagrant

Vagrant scripts are here

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    2>&1 | tee mylog        # All components
  mem.sh restconf backend           # Only backend and cli

Run pattern of tests

The above scripts work with the pattern variable to limit the scope of which tests run, eg:

  pattern="test_c*.sh" mem.sh

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

For example, in FreeBSD, add:

  wwwuser=www
  make=gmake

https

If you use evhtp with configure --with-restconf=evhtp, you can prepend the tests with RCPROTO=https which will run all restconf tests with SSL https and server certs.

Ensure the server keys are in order, as follows.

If you already have server certs, ensure CLICON_SSL_SERVER_CERT and CLICON_SSL_SERVER_KEY points to them.

If you do not have them, generate self-signed certs, eg as follows:

  openssl req -x509 -nodes -newkey rsa:4096 -keyout /etc/ssl/private/clixon-server-key.pem -out /etc/ssl/certs/clixon-server-crt.pem -days 365

There are also client-cert tests, eg test_ssl*.sh