-
Notifications
You must be signed in to change notification settings - Fork 712
Open
Description
lima/pkg/yqutil/yqutil_test.go
Lines 30 to 55 in 2992029
| func TestEvaluateExpressionComplex(t *testing.T) { | |
| expression := `.mounts += {"location": "foo", "mountPoint": "bar"}` | |
| content := ` | |
| # Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest | |
| # 🟢 Builtin default: null (Mount nothing) | |
| # 🔵 This file: Mount the home as read-only, /tmp/lima as writable | |
| mounts: | |
| - location: "~" | |
| # Configure the mountPoint inside the guest. | |
| # 🟢 Builtin default: value of location | |
| mountPoint: null | |
| ` | |
| // Note: yq will use canonical yaml, with indented sequences | |
| // Note: yq will not explicitly quote strings, when not needed | |
| expected := ` | |
| # Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest | |
| # 🟢 Builtin default: null (Mount nothing) | |
| # 🔵 This file: Mount the home as read-only, /tmp/lima as writable | |
| mounts: | |
| - location: "~" | |
| # Configure the mountPoint inside the guest. | |
| # 🟢 Builtin default: value of location | |
| mountPoint: null | |
| - location: foo | |
| mountPoint: bar | |
| ` |
Lots of users are expected to use --set (yq) soon, so I'd prefer to adopt yq's indentation style.
Revert:
Metadata
Metadata
Assignees
Labels
No labels