Commit 87693f0c authored by Jameson Rollins's avatar Jameson Rollins

extend manager tests to monitor at new status channels

parent ba298245
......@@ -87,7 +87,9 @@ cawait T1:GRD-TEST_STATUS DONE
node_dump_state TEST > OUTPUT
kill_jobs
cat <<EOF >EXPECTED
T1:GRD-TEST_ACTIVE.True
T1:GRD-TEST_ERROR.False
T1:GRD-TEST_INTENT.False
T1:GRD-TEST_MANAGER.
T1:GRD-TEST_MODE.AUTO
T1:GRD-TEST_NOMINAL.D
......@@ -95,6 +97,7 @@ T1:GRD-TEST_NOMINAL_N.100
T1:GRD-TEST_NOMINAL_S.D
T1:GRD-TEST_OK.False
T1:GRD-TEST_OP.EXEC
T1:GRD-TEST_READY.True
T1:GRD-TEST_REQUEST.A
T1:GRD-TEST_REQUEST_N.1
T1:GRD-TEST_REQUEST_S.A
......@@ -103,6 +106,8 @@ T1:GRD-TEST_STATE.A
T1:GRD-TEST_STATE_N.1
T1:GRD-TEST_STATE_S.A
T1:GRD-TEST_STATUS.DONE
T1:GRD-TEST_SUBNODES_NOT_OK.0
T1:GRD-TEST_SUBNODES_TOTAL.0
T1:GRD-TEST_TARGET.A
T1:GRD-TEST_TARGET_N.1
T1:GRD-TEST_TARGET_S.A
......@@ -121,7 +126,9 @@ cawait T1:GRD-TEST_OK True
node_dump_state TEST > OUTPUT
kill_jobs
cat <<EOF >EXPECTED
T1:GRD-TEST_ACTIVE.True
T1:GRD-TEST_ERROR.False
T1:GRD-TEST_INTENT.True
T1:GRD-TEST_MANAGER.
T1:GRD-TEST_MODE.AUTO
T1:GRD-TEST_NOMINAL.D
......@@ -129,6 +136,7 @@ T1:GRD-TEST_NOMINAL_N.100
T1:GRD-TEST_NOMINAL_S.D
T1:GRD-TEST_OK.True
T1:GRD-TEST_OP.EXEC
T1:GRD-TEST_READY.True
T1:GRD-TEST_REQUEST.D
T1:GRD-TEST_REQUEST_N.100
T1:GRD-TEST_REQUEST_S.D
......@@ -137,6 +145,8 @@ T1:GRD-TEST_STATE.D
T1:GRD-TEST_STATE_N.100
T1:GRD-TEST_STATE_S.D
T1:GRD-TEST_STATUS.DONE
T1:GRD-TEST_SUBNODES_NOT_OK.0
T1:GRD-TEST_SUBNODES_TOTAL.0
T1:GRD-TEST_TARGET.D
T1:GRD-TEST_TARGET_N.100
T1:GRD-TEST_TARGET_S.D
......
......@@ -63,6 +63,11 @@ node_dump_state() {
"$node"_ERROR \
"$node"_MANAGER \
"$node"_STALLED \
"$node"_ACTIVE \
"$node"_SUBNODES_TOTAL \
"$node"_SUBNODES_NOT_OK \
"$node"_READY \
"$node"_INTENT \
"$node"_OK \
| sort
}
......
This diff is collapsed.
from guardian import GuardState
nominal = 'C'
class A(GuardState):
pass
......
from guardian import GuardState
from guardian import NodeManager
from guardian import Node, NodeManager
nodes = NodeManager(['TEST'])
node0 = Node('TEST')
nodes1 = NodeManager(['TEST1', 'TEST2'])
class INIT(GuardState):
def main(self):
if nodes['TEST'] == 'A':
if node0 == 'A':
return 'C'
class A(GuardState):
def main(self):
nodes.set_managed()
node0.set_managed()
@nodes.checker(fail_return='FAULT')
@node0.checker(fail_return='FAULT')
def run(self):
return True
......@@ -24,20 +24,20 @@ class A(GuardState):
class B(GuardState):
request = False
def main(self):
nodes['TEST'] = 'A'
node0.set_request('C')
class C(GuardState):
@nodes.checker(fail_return='FAULT')
@node0.checker(fail_return='FAULT')
def run(self):
return nodes.arrived
return node0.arrived
class D(GuardState):
def main(self):
nodes.release()
node0.release()
@nodes.checker()
@node0.checker()
def run(self):
return True
......@@ -53,7 +53,7 @@ class E(GuardState):
class FAULT(GuardState):
request = False
@nodes.checker(fail_return=False)
@node0.checker(fail_return=False)
def run(self):
return 'INIT'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment