selector: make sure value of GT and LT is integer

This commit is contained in:
Hongchao Deng
2016-07-04 16:02:42 -07:00
parent cd7a56ba46
commit 7127915a66
4 changed files with 41 additions and 38 deletions

View File

@@ -212,17 +212,17 @@ func TestNodeSelectorRequirementsAsSelector(t *testing.T) {
in: []NodeSelectorRequirement{{
Key: "foo",
Operator: NodeSelectorOpGt,
Values: []string{"1.1"},
Values: []string{"1"},
}},
out: mustParse("foo>1.1"),
out: mustParse("foo>1"),
},
{
in: []NodeSelectorRequirement{{
Key: "bar",
Operator: NodeSelectorOpLt,
Values: []string{"7.1"},
Values: []string{"7"},
}},
out: mustParse("bar<7.1"),
out: mustParse("bar<7"),
},
}