Post migration assertion fixes
Signed-off-by: Daniel Nephin <dnephin@docker.com> rewritten from github.com/moby/moby c9e52bd0da0461e605a3678b85702f83081504a7docker-18.09
parent
3b28b903b9
commit
414a98c2e0
|
@ -3,6 +3,7 @@ package parser // import "github.com/docker/docker/builder/dockerfile/parser"
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/gotestyourself/gotestyourself/assert"
|
||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
||||
)
|
||||
|
@ -16,9 +17,11 @@ func TestParseNameValOldFormat(t *testing.T) {
|
|||
Value: "foo",
|
||||
Next: &Node{Value: "bar"},
|
||||
}
|
||||
assert.Check(t, is.DeepEqual(expected, node))
|
||||
assert.DeepEqual(t, expected, node, cmpNodeOpt)
|
||||
}
|
||||
|
||||
var cmpNodeOpt = cmp.AllowUnexported(Node{})
|
||||
|
||||
func TestParseNameValNewFormat(t *testing.T) {
|
||||
directive := Directive{}
|
||||
node, err := parseNameVal("foo=bar thing=star", "LABEL", &directive)
|
||||
|
@ -36,7 +39,7 @@ func TestParseNameValNewFormat(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
assert.Check(t, is.DeepEqual(expected, node))
|
||||
assert.DeepEqual(t, expected, node, cmpNodeOpt)
|
||||
}
|
||||
|
||||
func TestNodeFromLabels(t *testing.T) {
|
||||
|
@ -62,8 +65,7 @@ func TestNodeFromLabels(t *testing.T) {
|
|||
}
|
||||
|
||||
node := NodeFromLabels(labels)
|
||||
assert.Check(t, is.DeepEqual(expected, node))
|
||||
|
||||
assert.DeepEqual(t, expected, node, cmpNodeOpt)
|
||||
}
|
||||
|
||||
func TestParseNameValWithoutVal(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue