UNCLASSIFIED - NO CUI

Skip to content

Replace Molecule OPNsense component placeholder assertions with real tests

User Story:

As a developer, I want real test assertions for OPNsense component so that OPNsense operator functionality is validated

Problem Statement:

OPNsense component tests don't validate firewall rules, network policies, or VPN configurations deployed by the operator.

Acceptance Criteria:

  • OPNsense CRD creation validated with proper configuration
  • Firewall rules deployment verified
  • Network interface configuration tested
  • VLAN tagging and routing validated
  • API connectivity to OPNsense confirmed.
  • Configuration backup and restore tested
  • Idempotency verified (no changes on second run)

Implementation Details:

Files to Modify:

  • molecule/default/tasks/opnsense_test.yml - Replace placeholder assertions with real tests
  • molecule/default/vars/opnsense_test_vars.yml - Test configurations for firewall scenarios

Dependencies:

  • requests library for OPNsense API testing
  • kubernetes Python client.

Additional Notes:

Validate firewall API access, verify rule application, check network segmentation (Management: 10.2X.100.0/24, IPMI: 10.23.100.0/24, K8s: 10.22.100.0/24), and test configuration persistence.


Edited by Lam Do