Skip to content

Unit Test Cases

Aaron edited this page Jun 17, 2019 · 1 revision

Currently there are some basic unit tests for the following ESC VNFDs

  • altiostar vCU
  • altiostar vDU
  • vPE
  • VPEC DI
  • VPEC SI

Some of the specific numbers are changed depending on the VNFD being converted. Check tests/units/esc for the specific tests for each VNFD. This is going to just be an overview of the basic tests and the reasoning behind them.

Tests

VNF

  • Sanity test, making sure something gets written
  • Make sure contents exist, currently the same as test_sanity

Virtual Link

  • Make sure the 'int-virtual-link-desc' exists
  • Ensure there are more than x virtual links

External Connection Point

  • Make sure ext-cpd exists
  • There is at least one external connection point
    • There can be 1 or 2, having 0 is an error

VDU

  • VDU section exists
  • Make sure there are x VDUs that have been converted
  • Make sure each of the VDUs has a storage, compute, and sw_image descriptors
    • Also tests if they are not supposed to have the fields
  • Count internal connection points for each VDU

Deployment Flavor

  • Make sure df exists
  • That instantiation level exists
  • And that a vdu profile exists

Artifact

  • Check that each existing artifact has id, url, and checksum elements