From 0b08c8bfdbebf5dda9107165363d6f7f9497b491 Mon Sep 17 00:00:00 2001
From: Helga Velroyen <helgav@google.com>
Date: Wed, 20 Feb 2013 13:07:02 +0100
Subject: [PATCH] Remove test of obsolete getNetworkUuid method

This will remove the tests for the getNetworkUuid method.
The method will be obsolete after the changes regarding
identification of networks by UUID and not name are merged
into master. Will send another patch for removing the
actual method.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 test/hs/Test/Ganeti/Query/Network.hs | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/test/hs/Test/Ganeti/Query/Network.hs b/test/hs/Test/Ganeti/Query/Network.hs
index 4a3ae50bb..64efa280f 100644
--- a/test/hs/Test/Ganeti/Query/Network.hs
+++ b/test/hs/Test/Ganeti/Query/Network.hs
@@ -62,22 +62,6 @@ prop_getGroupConnection_notFound group uuid =
   let net_keys = (Map.keys . fromContainer . groupNetworks) group
   in notElem uuid net_keys ==> isNothing (getGroupConnection uuid group)
 
--- | Check if getting the network's UUID from the config actually gets the
--- correct UUIDs.
-prop_getNetworkUuid :: ConfigData -> Property
-prop_getNetworkUuid cfg =
-  let nets = (Map.elems . fromContainer . configNetworks) cfg
-  in True ==? all
-    (\n -> fromJust (getNetworkUuid cfg ((fromNonEmpty . networkName) n))
-    == networkUuid n) nets
-
--- | Check if trying to get a UUID of a non-existing networks results in
--- 'Nothing'.
-prop_getNetworkUuid_notFound :: ConfigData -> String -> Property
-prop_getNetworkUuid_notFound cfg uuid =
-  let net_keys = (Map.keys . fromContainer . configNetworks) cfg
-  in notElem uuid net_keys ==> isNothing (getNetworkUuid cfg uuid)
-
 -- | Checks whether actually connected instances are identified as such.
 prop_instIsConnected :: ConfigData -> Property
 prop_instIsConnected cfg =
@@ -99,9 +83,7 @@ prop_instIsConnected_notFound cfg network_uuid =
         not (instIsConnected cfg network_uuid inst)
 
 testSuite "Query_Network"
-  [ 'prop_getNetworkUuid
-  , 'prop_getNetworkUuid_notFound
-  , 'prop_getGroupConnection
+  [ 'prop_getGroupConnection
   , 'prop_getGroupConnection_notFound
   , 'prop_instIsConnected
   , 'prop_instIsConnected_notFound
-- 
GitLab