- # FIXME: We probably should normalize text as json (and by that, test whether it is a json at all).
- Should_Be_Equal_As_Strings ${text} {"output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}}
+ [Arguments] ${actual_raw}
+ ${expected_raw}= BuiltIn.Set_Variable
+ ... {"network-topology-pcep:output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}}
+ # TODO: Is that JSON worth referencing pcepuser variables from this library?
+ ${expected_normalized}= norm_json.normalize_json_text ${expected_raw}
+ ${actual_normalized}= norm_json.normalize_json_text ${actual_raw}
+ BuiltIn.Should_Be_Equal ${actual_normalized} ${expected_normalized}
+ # TODO: Would the diff approach be more useful?
+
+Pcep_Topology_Precondition
+ [Documentation] Compare current pcep-topology to empty one.
+ ... Timeout is long enough to see that pcep is ready.
+ [Arguments] ${session}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 300s
+ ... 1s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${PCEP_VAR_FOLDER}/default_off
+ ... session=${session}
+ ... verify=True