mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-03 20:56:52 +02:00
adding test for escaped words
This commit is contained in:
@@ -39,11 +39,16 @@ func TestUpdateLabels(t *testing.T) {
|
||||
Key: "bar",
|
||||
Value: "baz",
|
||||
},
|
||||
{
|
||||
Key: "multiword",
|
||||
Value: "lots\\ of\\ words",
|
||||
},
|
||||
}
|
||||
|
||||
expectedLabels := map[string]string{
|
||||
"foo": "override",
|
||||
"bar": "baz",
|
||||
"foo": "override",
|
||||
"bar": "baz",
|
||||
"multiword": "lots of words",
|
||||
}
|
||||
updateLabels(labels, cfg)
|
||||
testutil.CheckErrorAndDeepEqual(t, false, nil, expectedLabels, cfg.Labels)
|
||||
|
||||
Reference in New Issue
Block a user