Skip to content

Commit 8012eb7

Browse files
author
Elias Nygren
committed
fix server tests, add tags to mock JSON responses
1 parent 333dd43 commit 8012eb7

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

test/json_data/server.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
"hostname" : "fi.example.com",
99
"memory_amount" : "512",
1010
"uuid" : "00798b85-efdc-41ca-8021-f6ef457b8531",
11-
"state" : "started"
11+
"state" : "started",
12+
"tags": {
13+
"tag": [
14+
"web1"
15+
]
16+
}
1217
},
1318
{
1419
"zone" : "uk-lon1",
@@ -17,8 +22,13 @@
1722
"hostname" : "uk.example.com",
1823
"memory_amount" : "512",
1924
"uuid" : "009d64ef-31d1-4684-a26b-c86c955cbf46",
20-
"state" : "stopped"
25+
"state" : "stopped",
26+
"tags": {
27+
"tag": [
28+
"web2"
29+
]
30+
}
2131
}
2232
]
2333
}
24-
}
34+
}

test/json_data/server_00798b85-efdc-41ca-8021-f6ef457b8531.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
}
3232
]
3333
},
34+
"tags": {
35+
"tag": [
36+
"web1"
37+
]
38+
},
3439
"timezone" : "UTC",
3540
"title" : "Helsinki server",
3641
"uuid" : "00798b85-efdc-41ca-8021-f6ef457b8531",
@@ -41,4 +46,4 @@
4146
"vnc_port" : "00000",
4247
"zone" : "fi-hel1"
4348
}
44-
}
49+
}

test/json_data/server_009d64ef-31d1-4684-a26b-c86c955cbf46.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
}
3232
]
3333
},
34+
"tags": {
35+
"tag": [
36+
"web2"
37+
]
38+
},
3439
"timezone" : "UTC",
3540
"title" : "London server",
3641
"uuid" : "009d64ef-31d1-4684-a26b-c86c955cbf46",
@@ -41,4 +46,4 @@
4146
"vnc_port" : "00000",
4247
"zone" : "uk-lon1"
4348
}
44-
}
49+
}

0 commit comments

Comments
 (0)