Assert keeps going after failure, but require immediately fails
the tests, making it easier to find the output related to the test
failure, rather than having to comb through a bunch of subsequent
assertion failures. For equality tests, we may or may not want to
continue, but for error checks we almost always want to immediately
fail the test. Exceptions can be changed as-needed.
This PR intends to move the loader api to
internal. Only the necessary methods which
are needed for the api have been put into
`pkg/loader.go`.
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
* WIP
* Fix merge corner cases
* Add test for explicit !!merge tag
* Fix tests
* Cleanup
* Cleanup
* Fix deanchoring lists
* Add test case for keeping comments
* Add MapEntrySetter and fix json marshalling after deanchoring
* Keep duplicated keys
* Move MergeTag definition to yaml alias
* Remove go-spew from api
* Add support for sequence nodes on merge tags
* Add docstring to MapEntrySetter.Key
* Add docstring to MapEntrySetter struct
* Add tests to MapEntrySetter
* Fix duplicate merge key
* Revert whitespace changes on forked go-yaml
* Remove AssocMapEntry function
* Refactoring merge order
* Return errors on VisitFields and PipeE
* Add tests for each non-conforming map merges
Resources annotated as "local-config" are expected to be ignored. This skip local resource happens in "accumulateResources" which happens before any transformation operations.
However, the local resource may be needed in transformations.
Thus, this change removes the "drop local resource" logic from accumulateResources and removes these local resource after all transformation operations and var operations are done.
Note:
None of the existing ResMap functions can drop the resource slice easily: "Clear" will ruin the resource order, "AppendAll" only adds non-existing resource, "AbsorbAll" only add or modify but not delete.
Thus, we introduce a new func "Intersection" for resourceAccumulator that specificaly removes the resource by ID and keep the original order.
* Move api/filesys to kyaml/filesys
* Add deprecated version of api/filesys with aliases to new code
* Use new kyaml/filesys package and update dependencies
* Migrate to kyaml/filesys and update dependencies
* Skip tests that break on Windows
The implementations in WNode are supposed to be thin,
as it will be removed once #2506 closes.
The change also makes some addjustments for the
upcoming flip of the enable_kyaml flag, pointing to
issue #3271.