Open tardoe opened 2 months ago
I've always considered the live integration testing with Containerlab an important differentiator for the plugin. After having Containerlab installed and downloading the Docker image, the tests can be performed "offline" and are entirely optional. CI/CD workflows on GitHub spin up Containerlab instances internally
Having a 'snapshot' of JSONRPC output isn't as comprehensive as being able to spin up any release you want, with any node configuration / topology, and then running regression testing against that. I'd expect more bugs to be found in the area of specific (combinations of) config options and/or race conditions.
In short, I'm not sure what problem you'd be solving?
@jbemmel there would still be the option of running the tests locally, but having the option to run tests easily (e.g. for small fixes) without needing a full lab lowers the barrier of entry.
@tardoe I'd say on a high level I'd split the testing into the following parts:
@tardoe there is no barrier thanks to Containerlab and SR Linux. Unlike most other platforms that developers may be familiar with, SR Linux makes an easy-to-obtain free container image available. This makes it trivial to construct CI/CD pipelines such as the one illustrated in this repo - without the user having to lift a finger!
Consequently, there is no need to jump through hoops like you are suggesting. This is the best other platforms can do - but ours (yours) is better than that
Opening this issue to begin discussion on how we should handle testing with v2. Currently the unit tests return mocked data and integration tests require containerlab to be spun up.
I propose the following:
_jsonrpc*
methods under text fixtures and enable per-getter tests without needing an online network.@hellt thoughts / ideas / comments / discussion?