Change JSON letter case in tests

This commit is contained in:
Klaudiusz Dembler 2018-05-15 18:43:48 +02:00
parent 7bb047ec75
commit aa325ec2d9

View File

@ -45,10 +45,10 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore default cpu set", "Restore default cpu set",
`{ `{
"PolicyName": "none", "policyName": "none",
"DefaultCPUSet": "4-6", "defaultCPUSet": "4-6",
"Entries": {}, "entries": {},
"Checksum": 2912033808 "checksum": 2912033808
}`, }`,
"none", "none",
"", "",
@ -59,13 +59,13 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore valid checkpoint", "Restore valid checkpoint",
`{ `{
"PolicyName": "none", "policyName": "none",
"DefaultCPUSet": "1-3", "defaultCPUSet": "1-3",
"Entries": { "entries": {
"container1": "4-6", "container1": "4-6",
"container2": "1-3" "container2": "1-3"
}, },
"Checksum": 1535905563 "checksum": 1535905563
}`, }`,
"none", "none",
"", "",
@ -80,10 +80,10 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore checkpoint with invalid checksum", "Restore checkpoint with invalid checksum",
`{ `{
"PolicyName": "none", "policyName": "none",
"DefaultCPUSet": "4-6", "defaultCPUSet": "4-6",
"Entries": {}, "entries": {},
"Checksum": 1337 "checksum": 1337
}`, }`,
"none", "none",
"checkpoint is corrupted", "checkpoint is corrupted",
@ -99,10 +99,10 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore checkpoint with invalid policy name", "Restore checkpoint with invalid policy name",
`{ `{
"PolicyName": "other", "policyName": "other",
"DefaultCPUSet": "1-3", "defaultCPUSet": "1-3",
"Entries": {}, "entries": {},
"Checksum": 4195836012 "checksum": 4195836012
}`, }`,
"none", "none",
`configured policy "none" differs from state checkpoint policy "other"`, `configured policy "none" differs from state checkpoint policy "other"`,
@ -111,10 +111,10 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore checkpoint with unparsable default cpu set", "Restore checkpoint with unparsable default cpu set",
`{ `{
"PolicyName": "none", "policyName": "none",
"DefaultCPUSet": "1.3", "defaultCPUSet": "1.3",
"Entries": {}, "entries": {},
"Checksum": 1025273327 "checksum": 1025273327
}`, }`,
"none", "none",
`could not parse default cpu set "1.3": strconv.Atoi: parsing "1.3": invalid syntax`, `could not parse default cpu set "1.3": strconv.Atoi: parsing "1.3": invalid syntax`,
@ -123,13 +123,13 @@ func TestCheckpointStateRestore(t *testing.T) {
{ {
"Restore checkpoint with unparsable assignment entry", "Restore checkpoint with unparsable assignment entry",
`{ `{
"PolicyName": "none", "policyName": "none",
"DefaultCPUSet": "1-3", "defaultCPUSet": "1-3",
"Entries": { "entries": {
"container1": "4-6", "container1": "4-6",
"container2": "asd" "container2": "asd"
}, },
"Checksum": 2764213924 "checksum": 2764213924
}`, }`,
"none", "none",
`could not parse cpuset "asd" for container id "container2": strconv.Atoi: parsing "asd": invalid syntax`, `could not parse cpuset "asd" for container id "container2": strconv.Atoi: parsing "asd": invalid syntax`,