(#16753) Verify by using puppet node search
Previously, the test checked that the yaml file was written by looking
at a specific file on the filesystem. This is, however, not the
guarantee that was asked for in the bug. This changes the test to check
that the data is available by using a puppet subcommand to read the
available data and so allows us to modify in the future how to actually
store the data.