29 Commits
Author SHA1 Message Date
Mattias Walström b8ba1a1042 test: spec: Allow to generate test specification without logical topology 2026-06-27 10:57:22 +02:00
Joachim Wiberg 95bd795347 test: add some basic ptp tests
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-24 14:29:58 +02:00
Joachim Wiberg 39b9c7a065 test: add new tests for NTP
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:28 +01:00
Joachim Wiberg 1bbd80d8c7 test: drop leading ietf/infix prefix from directories
Let's drop the leading IETF or Infix prefixes from tests.  Initially the
idea was to mimnic the YANG models, but it's difficult to navigate and
does not provide any real benefit to developers or end-users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:23 +01:00
Joachim Wiberg 47c4ddfb7d test: new test, basic firewall zone verification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:13 +02:00
Joachim Wiberg b4a5b35c0e test/spec: refactor test spec & report generation
Import new 9pm version for improved test report generation.  With this
in place we can take the opportunity to also refactor and simplify the
test spec. generation.

Fixes #1129

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:03 +02:00
Joachim Wiberg fe2d0f488d test/case: simplify AsciiDoc image references
This commit greatly simplifies AsciiDoc image references in generated
Readme.adoc files.  The two focused use-cases that remain after this
change are working references in:

 - Generated output/images/test-report.pdf
 - Viewing test's Readme.adoc from GitHub

Previously we aimed to have working images also when the test's Readme
was included in the parent directory's Readme.adoc.  This, however, is
not supported as of this commit.  It seems unlikely also to ever be a
supported feature of AsciiDoc on GitHub, for details, see the following
issue: <https://github.com/github/markup/issues/1095>

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:38 +02:00
Joachim Wiberg 87f9b58957 test/spec: pep-8 fixes, minor cleanup only
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:37 +02:00
Richard Alpe b388e080ad test: fix image paths in test specifications (again)
{topdoc} is needed for asciidoctor to find the image during test
report generation.

This is the same functional change as 02d8288863 but with the
generation script actually updated. This was forgotten in the last
commit.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-03 14:11:44 +01:00
Joachim WibergandTobias Waldekranz 773683bfd5 test: spec: catch and format dot file errors
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim Wiberg 9198383742 test: spec: for new tests a Readme.adoc does not exist
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Richard Alpe 28f67ff608 test: add topdoc dir to all test specifications
This should be a non functional change. The idea is to use the topdoc
dir from 9pm when generating the test report.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:11 +01:00
Mattias Walström 907401f6f2 generate_spec: Allow to run script manually and show all output 2025-01-14 13:43:59 +01:00
Mattias Walström 9a831217e4 test-specification: Add support for python f-strings in step and description
This is only availible for tests that require paramters. If the test have a
parameter --data the description and test steps can contain {data} which will
be replaced with tha actual data of the parameter data in the test specification.
2025-01-14 10:54:05 +01:00
Joachim WibergandMattias Walström 1aab75d86a test: spec: remove .tmp files when done
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-13 20:16:37 +01:00
Mattias Walström 29031be4e9 test-specification: Generate test specification from suite file
The suite can also contain meta data for the test specification,
One meta data that is implemented is title, which is used when the
same test code is used twice with parameters.

Also if a test case should not be present in the test specification
for some case. You can add specification: False as meta data.
2025-01-10 21:42:10 +01:00
Mattias Walström de50179b3b test-spec: Remove autogenerated file
Add it to gitignore to not be added again.
2024-11-25 14:44:32 +01:00
Mattias Walström 1cfbf9bc11 test: case: ospf_container: Update test
Add "VLAN switches" between each Router, to only pass the tagged traffic
between the routers.

Add test specification and add to test suite
2024-11-25 14:25:26 +01:00
Mattias Walström c7db71d095 test-spec: Add support for images in description 2024-11-25 14:03:03 +01:00
Ahmed Karic 798194b64a test: update bridge vlan separation test
- Verify that broadcast packets are also properly moved accross the
  bridge, i.e. the broadcast packets sent from vlan interface VLAN10
  do not reach VLAN20

Fixes #773
2024-11-25 08:46:20 +01:00
Ahmed Karic 594d074f7a test: update dhcp test topologies
Fixes #746
2024-10-24 09:59:56 +02:00
Mattias Walström 3b3656c8f5 test: spec: change image format from PNG to SVG
SVG is a plain text file, better to see why it changed
than binary PNG. Also fix #744 by adding infix/OEM hash
to test specification

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-10-23 14:21:26 +02:00
Mattias Walström 76f0c8e3e6 test:spec: Add version of Infix/OEM build
Show the version of the infix build, for traceability

This fix #744

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-10-23 13:45:30 +02:00
Mattias Walström 5a28a5611a test-specification: Make possible to add ASCII art
The ASCII art over the topology must be surrounded by .... and
is codeblock in ASCIIdoc. Since this is only used for ASCII arts
to help describe tests, border and background are white.
2024-10-04 11:22:58 +02:00
Mattias Walström 0d98ee5716 test-spec: Fail build on failed test specification build
This can fail on two ways:
* Generate topology files
  Unfortunatly the python-graphwiz has no way of detect faults
  it just show 'Warning' on stderr, catch it and if != empty, exit 1

* Generate pdf
  Here the default error level was FATAL, but for example a file
  that is included does not exist it just show an error on stdout.
  the error level is now INFO, it should always be silent.
2024-10-02 23:31:14 +02:00
Mattias Walström a533b87ea4 test: case: Move infix_interfaces into ietf-interfaces
This is how all other models are handled, the topmodel is naming the
test directory
2024-09-17 08:27:23 +02:00
Mattias Walström d79d6b7f4d test: spec: Always generate specifications with relative path 2024-09-09 15:11:36 +02:00
Mattias Walström e4e7dbd714 tests: Add test specification
Add minor changes in all testscripts, to add name and description
Add generated test specification
Add generated topology image
2024-09-06 10:18:16 +02:00
Mattias Walström b3831ebe9f Add generation of test specification
The test specifcation is written in Asciidoc and is autogenerated from the content
in the test scripts.

Fonts imported from https://github.com/adobe-fonts/source-code-pro/

To generate the test script:

$ make test-spec
2024-09-06 10:18:16 +02:00