File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 22
33Tests: [ patch/yaml_compat_test.go] ( ../patch/yaml_compat_test.go )
44
5- - Use ` !!str "" ` instead of ` "" `
5+ - [ fixed ] Use ` !!str "" ` instead of ` "" `
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010
1111var _ = Describe ("YAML compatibility" , func () {
1212 Describe ("empty string" , func () {
13- It ("[WORKAROUND ] works deserializing empty strings" , func () {
13+ It ("[workaround ] works deserializing empty strings" , func () {
1414 str := `
1515- type: replace
1616 path: /instance_groups/name=cloud_controller/instances
@@ -26,7 +26,7 @@ var _ = Describe("YAML compatibility", func() {
2626 Expect ((* val ).(string )).To (Equal ("" ))
2727 })
2828
29- It ("[PORBLEM ] does not work deserializing empty strings" , func () {
29+ It ("[fixed ] does not work deserializing empty strings" , func () {
3030 str := `
3131- type: replace
3232 path: /instance_groups/name=cloud_controller/instances
@@ -36,8 +36,10 @@ var _ = Describe("YAML compatibility", func() {
3636 var opDefs []OpDefinition
3737
3838 err := yaml .Unmarshal ([]byte (str ), & opDefs )
39- Expect (err ).To (HaveOccurred ())
40- Expect (err .Error ()).To (ContainSubstring ("cannot unmarshal !!str" ))
39+ Expect (err ).ToNot (HaveOccurred ())
40+
41+ val := opDefs [0 ].Value
42+ Expect ((* val ).(string )).To (Equal ("" ))
4143 })
4244 })
4345})
You can’t perform that action at this time.
0 commit comments