Revision 9c0a27d0 test/hs/Test/Ganeti/Rpc.hs
b/test/hs/Test/Ganeti/Rpc.hs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
{- |
9 | 9 |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
11 | 11 |
|
12 | 12 |
This program is free software; you can redistribute it and/or modify |
13 | 13 |
it under the terms of the GNU General Public License as published by |
... | ... | |
59 | 59 |
prop_noffl_request_allinstinfo call = |
60 | 60 |
forAll (arbitrary `suchThat` Objects.nodeOffline) $ \node -> monadicIO $ do |
61 | 61 |
res <- run $ Rpc.executeRpcCall [node] call |
62 |
stop $ res ==? [(node, Left (Rpc.OfflineNodeError node))]
|
|
62 |
stop $ res ==? [(node, Left Rpc.OfflineNodeError)]
|
|
63 | 63 |
|
64 | 64 |
prop_noffl_request_instlist :: Rpc.RpcCallInstanceList -> Property |
65 | 65 |
prop_noffl_request_instlist call = |
66 | 66 |
forAll (arbitrary `suchThat` Objects.nodeOffline) $ \node -> monadicIO $ do |
67 | 67 |
res <- run $ Rpc.executeRpcCall [node] call |
68 |
stop $ res ==? [(node, Left (Rpc.OfflineNodeError node))]
|
|
68 |
stop $ res ==? [(node, Left Rpc.OfflineNodeError)]
|
|
69 | 69 |
|
70 | 70 |
prop_noffl_request_nodeinfo :: Rpc.RpcCallNodeInfo -> Property |
71 | 71 |
prop_noffl_request_nodeinfo call = |
72 | 72 |
forAll (arbitrary `suchThat` Objects.nodeOffline) $ \node -> monadicIO $ do |
73 | 73 |
res <- run $ Rpc.executeRpcCall [node] call |
74 |
stop $ res ==? [(node, Left (Rpc.OfflineNodeError node))]
|
|
74 |
stop $ res ==? [(node, Left Rpc.OfflineNodeError)]
|
|
75 | 75 |
|
76 | 76 |
testSuite "Rpc" |
77 | 77 |
[ 'prop_noffl_request_allinstinfo |
Also available in: Unified diff