Revision a0724772 qa/qa_node.py
b/qa/qa_node.py | ||
---|---|---|
280 | 280 |
AssertCommand(["gnt-node", "power", "cycle", node_name]) |
281 | 281 |
_AssertOobCall(verify_path, "power-cycle %s" % full_node_name) |
282 | 282 |
|
283 |
# This command should fail as it expects output which isn't provided yet
|
|
284 |
# But it should have called the oob helper nevermind
|
|
283 |
# Those commands should fail as they expect output which isn't provided yet
|
|
284 |
# But they should have called the oob helper nevermind
|
|
285 | 285 |
AssertCommand(["gnt-node", "power", "status", node_name], |
286 | 286 |
fail=True) |
287 | 287 |
_AssertOobCall(verify_path, "power-status %s" % full_node_name) |
288 | 288 |
|
289 |
# Data, exit 0 |
|
289 |
AssertCommand(["gnt-node", "health", node_name], |
|
290 |
fail=True) |
|
291 |
_AssertOobCall(verify_path, "health %s" % full_node_name) |
|
292 |
|
|
293 |
AssertCommand(["gnt-node", "health"], fail=True) |
|
294 |
|
|
295 |
# Correct Data, exit 0 |
|
290 | 296 |
_UpdateOobFile(data_path, serializer.DumpJson({ "powered": True })) |
291 | 297 |
|
292 | 298 |
AssertCommand(["gnt-node", "power", "status", node_name]) |
293 | 299 |
_AssertOobCall(verify_path, "power-status %s" % full_node_name) |
294 | 300 |
|
301 |
_UpdateOobFile(data_path, serializer.DumpJson([["temp", "OK"], |
|
302 |
["disk0", "CRITICAL"]])) |
|
303 |
|
|
304 |
AssertCommand(["gnt-node", "health", node_name]) |
|
305 |
_AssertOobCall(verify_path, "health %s" % full_node_name) |
|
306 |
|
|
307 |
AssertCommand(["gnt-node", "health"]) |
|
308 |
|
|
309 |
|
|
310 |
# Those commands should fail as they expect no data regardless of exit 0 |
|
295 | 311 |
AssertCommand(["gnt-node", "power", "on", node_name], fail=True) |
296 | 312 |
_AssertOobCall(verify_path, "power-on %s" % full_node_name) |
297 | 313 |
|
... | ... | |
323 | 339 |
fail=True) |
324 | 340 |
_AssertOobCall(verify_path, "power-status %s" % full_node_name) |
325 | 341 |
|
342 |
AssertCommand(["gnt-node", "health", node_name], |
|
343 |
fail=True) |
|
344 |
_AssertOobCall(verify_path, "health %s" % full_node_name) |
|
345 |
|
|
346 |
AssertCommand(["gnt-node", "health"], fail=True) |
|
347 |
|
|
326 | 348 |
# No data, exit 1 (all should fail) |
327 | 349 |
_UpdateOobFile(data_path, "") |
328 | 350 |
AssertCommand(["gnt-node", "power", "on", node_name], fail=True) |
... | ... | |
341 | 363 |
fail=True) |
342 | 364 |
_AssertOobCall(verify_path, "power-status %s" % full_node_name) |
343 | 365 |
|
366 |
AssertCommand(["gnt-node", "health", node_name], |
|
367 |
fail=True) |
|
368 |
_AssertOobCall(verify_path, "health %s" % full_node_name) |
|
369 |
|
|
370 |
AssertCommand(["gnt-node", "health"], fail=True) |
|
371 |
|
|
344 | 372 |
# Different OOB script for node |
345 | 373 |
verify_path2 = qa_utils.UploadData(master["primary"], "") |
346 | 374 |
oob_script = ("#!/bin/sh\n" |
Also available in: Unified diff