test: Add test for dynamic snap-opt-* attrs

[ci skip]