-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unittest for pkg/limayaml/default.yaml #2334
Conversation
de8cbf3
to
d0164cb
Compare
pkg/limayaml/load.go pkg/limayaml/limayaml_test.go I used encoding/json for the test logging, just to avoid dependencies and whitespace... {"images":null,"ssh":{},"firmware":{},"audio":{},"video":{"vnc":{}},"containerd":{},"hostResolver":{},"caCerts":{},"rosetta":{}}
There is a bug in encoding/json, in that there is no empty value for struct... (go issue: 11939) It doesn't matter here, just makes test log "chatty"
The go-yaml encoder works though, it doesn't add empty structs like the json and the xml do. |
This comment was marked as resolved.
This comment was marked as resolved.
d0164cb
to
725703f
Compare
Could you rebase and squash the commits? |
9a92bbb
to
3cc6d3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
3cc6d3a
to
1a101d2
Compare
c135e4e
to
05c5e4f
Compare
Co-authored-by: Oleksandr Redko <[email protected]> Signed-off-by: Anders F Björklund <[email protected]>
05c5e4f
to
b84dd65
Compare
Make sure that it is possible to parse default.yaml to the expected LimaYAML structure
Add some minor changes, to make the internal representation (before defaults) "pretty"
Left to do is to remove the default list of architectures, from the default cpuType list:
After that, the default YAML is simply
images: []
- since that value is still mandatory.With some additional default values and "omitempty", it also matches an empty template.