azure-container-networking/test/utils
Hunter Gregory 17ed0b83fa
feat: [NPM] ipset save before restoring and fix grep UTs (#1085)
* use ipset save to update members and update error handling logic for ipsets to skip previously run lines. Also update some logging for iptables chain management

* remove unused code

* add comment block describing high level ipset restore logic

* fix bug in piping to grep. need to add pipe errors for fexec UTs so that we dont revert on dataplane UTs

* grep for npm sets working for ipsets save, but this breaks DP UTs

* VerifyCalls method for mock ioshim

* add ability to unit test piped commands

* update logging

* UTs for piping a command to grep

* grep for npm sets in ipset save, verify number of calls in UTs, and update ApplyIPSets test calls for dataplane UTs

* update comments based on PR suggestions

* addressing comments

* remove out-of-scope policy changes for this PR

* rename restore file creator files

* FIXME: setting v2 controllers toggle to true to create an image in pipeline

* Revert "FIXME: setting v2 controllers toggle to true to create an image in pipeline"

This reverts commit 31148c3034.

* wrap errors
2021-11-15 17:47:05 -08:00
..
utils.go feat: [NPM] ipset save before restoring and fix grep UTs (#1085) 2021-11-15 17:47:05 -08:00