testing: when using multiple yaml updaters on a file, the content is appended per update #544
Labels
bug
Something isn't working
needs-triage
applied to all new customer/user issues. Removed after triage occurs.
Description
When using two updaters on a file on my unit tests, I got both changes appended (the whole doc is appended at the end) instead of replaced into the specified section in the file or yaml root.
I could only reproduce this issue when using the testing fwk. When I use my code on a file (real testing, not using the testing fwk), it works 'fine'.
Here I called over the same index file the packageUpdater and the pipelineUpdater in my unit test:
This produced the following output:
This is independent of the type of updaters. You can run
s.Update(packageUpdater)
twice and you'll get the result appended instead of just replacing the section package. When I debugged the code I found the yaml section replacement is done correctly so there must be somewhere else the error.The text was updated successfully, but these errors were encountered: