Test case for issue 4012 pkg update not updating kptfile#4030
Open
michaelvl wants to merge 6 commits intokptdev:mainfrom
Open
Test case for issue 4012 pkg update not updating kptfile#4030michaelvl wants to merge 6 commits intokptdev:mainfrom
michaelvl wants to merge 6 commits intokptdev:mainfrom
Conversation
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a test-case for
kpt pkg get/updatethat reproduce the issue reported in #4012Note: Since this is a failing test-case it could be considered to disable the final and failing assertion until the problem have been resolved
This PR adds a
Kptfiletodataset1anddataset2for the sub packagemysql. The change betweendataset1anddataset2are:The test-case basically does a
kpt pkg get mysql@dataset1followed by akpt pkg update mysql@dataset2and verifies the content ofKptfile. The issue from #4012 thus results in a test-case failure with the following diff between the localKptfilevsdataset2(i.e. the local version have 'removals' compared todataset2because the localKptfileis not properly updated todataset2):Note, a copy of the
Kptfilefromdataset2have also been added todataset4anddataset5since these are 'clones' ofdataset2.This PR also correct an issue in
testutil.AssertKptfilerelated to sequence-nodes (this new test-case seems to be the first use of sequence-nodes inKptfiles). The issue is, thatkptfileutil.WriteFile()use encoder optionyaml.WideSequenceStyle, while the encoding used intestutil.AssertKptfileis a compact encoding. Without this correction, the test-case would fail with additional whitespace differences, e.g. (this is the initialpkg getverification ofdataset1that fails):