clixon/test
2019-02-16 17:53:24 +01: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 * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
lib.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
Makefile.in docker base and system images, and trigger docker test from travis. 2019-02-11 15:47:12 +01: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 * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
sum.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_choice.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_cli.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_compat.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_datastore.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_feature.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_identity.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_install.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_json.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_leafref.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_list.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_nacm.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_nacm_ext.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_nacm_module_read.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_nacm_module_write.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_nacm_protocol.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_netconf.sh Did not check for missing list keys in validate. [Key of a list isn't mandatory](https://github.com/clicon/clixon/issues/73) 2019-02-16 17:53:24 +01:00
test_openconfig.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_order.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_perf.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_restconf.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_restconf2.sh Did not check for missing list keys in validate. [Key of a list isn't mandatory](https://github.com/clicon/clixon/issues/73) 2019-02-16 17:53:24 +01:00
test_rpc.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_startup.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_stream.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_type.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_union.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_when_must.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +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 * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_yang.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_yang_load.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_yang_namespace.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00
test_yangmodels.sh * Changed base OS in clixon-system container to Alpine 2019-02-16 17:45:39 +01:00

Clixon tests

This directory contains testing code for clixon and the example application. Assumes setup of http daemon as describe under apps/restonf

  • jenkins Directory w Jenkins specific stuff
  • travis Directory w Travis specific stuff
  • all.sh Run through all tests with detailed output, and stop on first error.
  • sum.sh Run though all tests and print summary
  • mem.sh Make valgrind
  • site.sh Add your site-specific modifications here (see example below)
  • test_nacm.sh Auth tests using internal NACM
  • test_nacm_ext.sh Auth tests using external NACM (separate file)
  • test_nacm_protocol.sh Auth tests for incoming RPC:s
  • test_nacm_module_read.sh Auth tests for data node read operations
  • test_nacm_module_write.sh Auth tests for data node write operations
  • test_cli.sh CLI tests
  • test_netconf.sh Netconf tests
  • test_restconf.sh Restconf tests
  • test_yang.sh Yang tests for constructs not in the example.
  • test_leafref.sh Yang leafref tests
  • test_datastore.sh Datastore tests
  • and many more...

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, such as add this magic line as the first command line in the script, which ensures it works well when started from all.sh:

  s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi

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

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.

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:

  all.sh summary

Example site.sh file:

  # 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