testing-netop-configs

Run and create baseline-diff tests for netop-tools YAML configuration generation.

7|4|Updated Oct 24, 2024
One-click install
npx skills add https://github.com/Mellanox/netop-tools --skill testing-netop-configs-mellanox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-netop-configs
Source: https://github.com/Mellanox/netop-tools/tree/main/skills/testing-netop-configs
Command: npx skills add https://github.com/Mellanox/netop-tools --skill testing-netop-configs-mellanox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Validating that NVIDIA Network Operator configuration changes do not break existing YAML generation requires manual diffing, which is error-prone and slow. This Skill runs and creates regression tests that compare generated YAML against baseline files automatically. ## Core Features & Use Cases - Run Test Suites: Execute all tests or a single scenario via tests/unitest.sh, which sets CREATE_CONFIG_ONLY=1, generates YAML, and diffs against baselines. - Create New Tests: Scaffold a test directory with a config file of environment overrides, generate baseline YAML, and verify the test passes. - Debug Failures: Diagnose common failure causes such as changed defaults in global_ops.cfg, missing config overrides, or missing baseline files. - Use Case: After changing a default value in global_ops.cfg, run the full suite to see which baselines must be regenerated before pushing to CI. ## Quick Start Run all netop-tools configuration tests and show me any diffs against the baselines.

Frequently Asked Questions about testing-netop-configs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run netop-tools configuration tests?

Run tests by sourcing NETOP_ROOT_DIR.sh and executing ./tests/unitest.sh for the full suite, or pass a specific test config path like ./tests/unitest.sh tests/sriovnet_rdma/1/config to run one scenario.

How do I create a new test case for netop-tools YAML generation?

Create a directory under tests/ with a config file containing environment variable overrides, generate YAML with CREATE_CONFIG_ONLY=1, copy the generated files into the test directory as baselines, then verify with unitest.sh.

Why do all netop-tools tests fail after a config change?

All tests failing usually means a default changed in global_ops.cfg, so every baseline must be regenerated. A single test failing typically indicates a missing variable override in that test's config file.

What network use cases do the netop-tools tests cover?

Tests cover sriovnet_rdma, sriovibnet_rdma, hostdev, and macvlan_rdma_shared_device scenarios, including combined and version-specific variants under tests/25_10/ for Network Operator 25.10 behavior.

Does netop-tools testing run in CI?

Yes, GitHub Actions runs tests/unitest.sh on ubuntu-22.04 on every push via .github/workflows/main.yml. Tests are discovered automatically by finding config files with the find command.