case_queryNode_allfields :: Assertion
case_queryNode_allfields = do
  fdefs <- case queryFields (QueryFields (ItemTypeOpCode QRNode) []) of
             Bad msg -> fail $ "Error in query all fields: " ++
                        formatError msg
             Ok (QueryFieldsResult v) -> return v
  let field_sort = compare `on` fdefName
  assertEqual "Mismatch in all fields list"
    (sortBy field_sort . map (\(f, _, _) -> f) $ Map.elems Node.fieldsMap)
    (sortBy field_sort fdefs)

-- | Check if cluster node names are unique (first elems).
case_queryNode_allfields :: Assertion
case_queryNode_allfields = do
  fdefs <- case queryFields (QueryFields (ItemTypeOpCode QRNode) []) of
             Bad msg -> fail $ "Error in query all fields: " ++
                        formatError msg
             Ok (QueryFieldsResult v) -> return v
  let field_sort = compare `on` fdefName
  assertEqual "Mismatch in all fields list"
    (sortBy field_sort . map (\(f, _, _) -> f) $ Map.elems Node.fieldsMap)
    (sortBy field_sort fdefs)

-- | Check if cluster node names are unique (first elems).
case_queryNode_allfields = do
  fdefs <- case queryFields (QueryFields (ItemTypeOpCode QRNode) []) of
             Bad msg -> fail $ "Error in query all fields: " ++
                        formatError msg
             Ok (QueryFieldsResult v) -> return v
  let field_sort = compare `on` fdefName
  assertEqual "Mismatch in all fields list"
    (sortBy field_sort . map (\(f, _, _) -> f) $ Map.elems Node.fieldsMap)
    (sortBy field_sort fdefs)

-- | Check if cluster node names are unique (first elems).