clixon/test
2022-03-15 16:03:48 +01:00
..
cicd * HTTP/1 native parser as part of the RESTCONF client 2022-02-08 16:59:08 +01:00
fuzz * Unit test ifdef for restconf http1 parser 2022-02-17 09:16:01 +01:00
jenkins Added make test and travis experiment 2019-02-04 14:13:20 +01:00
vagrant Tests: added expect script for pagination stdio 2022-03-14 14:02:21 +01:00
virtualbox Deleted obsolete fields in clixon-config.yang 2022-03-05 12:48:37 +01:00
all.sh restconf memleaks 2021-06-24 13:09:18 +02:00
config.sh.in * [Strict auto completion for CLI argument expansion #163](https://github.com/clicon/clixon/issues/163) 2022-03-01 09:27:11 +01:00
example_social.sh Tests: added expect script for pagination stdio 2022-03-14 14:02:21 +01:00
jukebox.sh test env bash; freebsd config 2019-09-17 22:44:01 +02:00
lib.sh Restconf and http/1 modifications for http/1-only 2022-02-15 15:48:37 +01:00
long.sh Only test recursive dirs for OpenConfig tests. 2021-11-09 09:23:43 +01:00
Makefile.in Updated copyright statements to 2022 2022-01-18 16:36:00 +01:00
mem.sh * Fixed: RFC 8040 yang-data extension allows non-key lists 2021-07-19 11:15:49 +02:00
nacm.sh Added error handling in yang_path_arg triggered by no filter in get paginated 2021-11-10 18:35:24 +01:00
plot_perf.sh Only test recursive dirs for OpenConfig tests. 2021-11-09 09:23:43 +01:00
README.md Fixed: [Xpath API do not support filter data by wildcard](https://github.com/clicon/clixon/issues/313) 2022-03-15 16:03:48 +01:00
site.sh * Tests: use YANG_STANDARD_DIR from ./configure --with-yang-standard-dir=DIR instead of YANGMODELS from site.sh 2021-12-16 22:44:45 +01:00
sum.sh Fixed broken test scripts sum.sh and all.sh 2021-04-14 17:13:02 +02:00
test_api.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_api_path.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_augment.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_augment_state.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_augment_trans.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_autocli_editmode.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_autocli_extension.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_autocli_listkey_compress.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_autocli_spec.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_autocli_strict_expand.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_autocli_sub.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_autocli_treeref.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_c++.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_choice.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_apipath.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_duplicates.sh Tests for duplication bugfix https://github.com/clicon/clixon/issues/301 2022-02-10 17:14:51 +01:00
test_cli_history.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_leafref.sh * Fixed: [statement: require-instance should be true if not present according to rfc7950 Sec 9.9.3](https://github.com/clicon/clixon/issues/302) 2022-02-17 10:09:23 +01:00
test_cli_multikey.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_submodes.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_translate.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_cli_union.sh * Removed docker warning: set master default branch 2022-02-17 12:38:39 +01:00
test_cli_varonly.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_client.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_configdir.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_copy_config.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_datastore.sh Internal RESTCONF changes: 2021-04-30 14:49:01 +02:00
test_datastore_repair.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_db.sh * Follow-up on [restconf GET json response does not encode top level node with namespace as per rfc #303](https://github.com/clicon/clixon/issues/303) 2022-02-22 14:28:01 +01:00
test_debug.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_dispatcher.sh Dispatcher: modified key handling and added print function 2021-10-13 21:03:59 +02:00
test_feature.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_helloworld.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_identity.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_insert.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_install.sh - Memleaks in xpath parse error 2021-10-03 18:49:25 +02:00
test_instance_id.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_instance_id_multi.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_json.sh * XML to JSON CDATA translation is NOT stripped 2021-11-13 17:11:00 +01:00
test_json_list.sh * [JSON leaf-list output single element leaf-list does not use array](https://github.com/clicon/clixon/issues/289) 2021-11-29 13:43:10 +01:00
test_json_null.sh * [JSON leaf-list output single element leaf-list does not use array](https://github.com/clicon/clixon/issues/289) 2021-11-29 13:43:10 +01:00
test_leaf_default.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_leafref.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_leafref_augment.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_leafref_state.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_leafref_union.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_leafref_uses_augment.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_minmax.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_credentials.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_datanode.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_datanode_paths.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_datanode_read.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_datanode_write.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_default.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_ext.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_nacm_module_read.sh * Fixed: [restconf GET json response does not encode top level node with namespace as per rfc #303](https://github.com/clicon/clixon/issues/303) 2022-02-17 18:42:37 +01:00
test_nacm_module_write.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_nacm_protocol.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_nacm_recovery.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_netconf.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_netconf_filter.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_netconf_hello.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_netconf_notifications.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_netconf_ssh_callhome.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_netconf_whitespace.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_openconfig.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_openconfig_interfaces.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_openconfig_network_instance.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_openconfig_system.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_order.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_pagination_config.sh Test: Added expect to Dockerfile and made sure pagination test worked in docker 2022-03-14 15:22:04 +01:00
test_pagination_draft.sh * Fixed: [restconf GET json response does not encode top level node with namespace as per rfc #303](https://github.com/clicon/clixon/issues/303) 2022-02-17 18:42:37 +01:00
test_pagination_expect.exp Tests: added expect script for pagination stdio 2022-03-14 14:02:21 +01:00
test_pagination_state.sh Test: Added expect to Dockerfile and made sure pagination test worked in docker 2022-03-14 15:22:04 +01:00
test_pattern.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_perf_cli.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_json.sh * Partly Fixed: [String concatenation in YANG model leads to syntax error](https://github.com/clicon/clixon/issues/265) 2021-09-20 22:54:14 +02:00
test_perf_mem.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_netconf.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_restconf.sh * Fix: http1 parser termination with EOF required on freebsd flex 2022-02-17 20:55:52 +01:00
test_perf_restconf_ssl.sh * Fix: http1 parser termination with EOF required on freebsd flex 2022-02-17 20:55:52 +01:00
test_perf_startup.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_state.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_state_only.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_perf_xml.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_privileges.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_restconf.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_basic_auth.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_continue.sh Restconf and http/1 modifications for http/1-only 2022-02-15 15:48:37 +01:00
test_restconf_err.sh * Fix: http1 parser termination with EOF required on freebsd flex 2022-02-17 20:55:52 +01:00
test_restconf_http_upgrade.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_internal.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_internal_usecases.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_jukebox.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_listkey.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_netns.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_nmap.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_notifications.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_op.sh Convert int64, uint64 and decimal64 to string in xml to json convertion (regarding to RFC7951) 2022-02-25 13:16:09 +01:00
test_restconf_plain_patch.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_restconf_ssl_certs.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_restconf_startup.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_restconf_yang_patch_json.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_restconf_yang_patch_xml.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_rpc.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_search_index.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_sock.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_startup.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_submodule.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_transaction.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_transaction_restart.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_type.sh * [Strict auto completion for CLI argument expansion #163](https://github.com/clicon/clixon/issues/163) 2022-03-01 09:27:11 +01:00
test_type_range.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_union.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_unique.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_upgrade_auto.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_checkold.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_failsafe.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_interfaces.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_interfaces_rfc7895.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_module.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_quit.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_repair.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_upgrade_simple.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_when_must.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_with_default.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_xml.sh * XML to JSON CDATA translation is NOT stripped 2021-11-13 17:11:00 +01:00
test_xml_trees.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_xml_validate.sh * Made a separate Clixon datastore XML/JSON top-level symbol 2021-03-05 14:15:15 +01:00
test_xpath.sh Fixed: [Xpath API do not support filter data by wildcard](https://github.com/clicon/clixon/issues/313) 2022-03-15 16:03:48 +01:00
test_xpath_canonical.sh - New netconf-specific uint32 parse functions 2021-09-21 11:24:53 +02:00
test_xpath_functions.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang.sh * Bumped version to 5.7.0_PRE 2022-03-14 12:13:45 +01:00
test_yang_anydata.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang_bind.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang_default.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_yang_deviation.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang_extension.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang_load.sh * configure --with-wwwdir=<dir> is removed 2022-02-07 13:31:39 +01:00
test_yang_models_ieee.sh Fixed: YANG parsing: unknown-stmt was not allowed within another unknown-stmt 2022-02-09 14:21:40 +01:00
test_yang_models_ietf.sh Test: yang models added patches to counter https://github.com/YangModels/yang/issues/1165 2022-02-20 11:48:52 +01:00
test_yang_namespace.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01:00
test_yang_when.sh Module state upgrade: RFC7895 to RFC 8525 2022-03-07 10:56:54 +01: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.

Most scripts are bash scripts using standard awk/sed etc. There is also (at least one) expect script.

Note that some IETF yangs need to be available, by default these are in /usr/local//share/yang/standard. You can change this location with configure option --with-yang-standard-dir=DIR

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

Openconfig and Yang

To download the openconfig and yang models required for the tests:

   cd /usr/local/share/openconfig
   git clone https://github.com/openconfig/public
   cd /usr/local/share/yang
   git init
   git remote add -f origin https://github.com/YangModels/yang
   git config core.sparseCheckout true
   echo "standard/" >> .git/info/sparse-checkout
   echo "experimental/" >> .git/info/sparse-checkout
   git pull origin master

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:

  • DEMWAIT 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

For example, in FreeBSD, add:

  wwwuser=www
  make=gmake

https

For fcgi/nginx you need to setup https in the nginx config file, independently of clixon.

If you use native with configure --with-restconf=http1, 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 the RESTCONF variable in lib.sh points to them, by default the config is

  <server-cert-path>/etc/ssl/certs/clixon-server-crt.pem</server-cert-path>
  <server-key-path>/etc/ssl/private/clixon-server-key.pem</server-key-path>
  <server-ca-cert-path>/etc/ssl/certs/clixon-ca-crt.pem</server-ca-cert-path>

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_certs.sh

Known issues

Workaround: Unicode double-quote in iana-if-type@2022-03-07.yang