Migrate some config secret tests to api test Upstream-commit: 2c24bfd07069f8d3c292ff2ce5ac32e3d762a5b3 Component: engine