From ddedbd16185f756fd6171c6951877cedf78a647f Mon Sep 17 00:00:00 2001 From: Bruno Sakoto Date: Wed, 5 May 2021 08:11:19 -0400 Subject: Fix cps ran yang data model * Add a liquibase change set to update cps ran model data * Rename model "cps-ran-schema-model@2021-01-28.yang" to be compliant with yang specifications related to file layout https://tools.ietf.org/html/rfc7950#section-5.2 * Improve yang validation error handling to provide more information about the validation failure in the request response * Add csit test to verify cps ran model retrieval Issue-ID: CPS-377 Signed-off-by: Bruno Sakoto Change-Id: I4f0e337b50d79e81f895eb32f09ae9cb5d9d8a70 --- csit/tests/cps-admin/cps-admin.robot | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'csit/tests') diff --git a/csit/tests/cps-admin/cps-admin.robot b/csit/tests/cps-admin/cps-admin.robot index 0e07f38aa3..93818070ba 100644 --- a/csit/tests/cps-admin/cps-admin.robot +++ b/csit/tests/cps-admin/cps-admin.robot @@ -14,6 +14,8 @@ ${basePath} /cps/api ${dataspaceName} CSIT-Dataspace ${schemaSetName} CSIT-SchemaSet ${anchorName} CSIT-Anchor +${ranDataspaceName} NFP-Operational +${ranSchemaSetName} cps-ran-schema-model *** Test Cases *** Create Dataspace @@ -56,4 +58,12 @@ Create Anchor ${params}= Create Dictionary schema-set-name=${schemaSetName} anchor-name=${anchorName} ${headers}= Create Dictionary Authorization=${auth} ${response}= POST On Session CPS_HOST ${uri} params=${params} headers=${headers} - Should Be Equal As Strings ${response.status_code} 201 \ No newline at end of file + Should Be Equal As Strings ${response.status_code} 201 + +Get CPS RAN Schema Set info + ${uri}= Set Variable ${basePath}/v1/dataspaces/${ranDataspaceName}/schema-sets/${ranSchemaSetName} + ${headers}= Create Dictionary Authorization=${auth} + ${response}= Get On Session CPS_HOST ${uri} headers=${headers} expected_status=200 + ${responseJson}= Set Variable ${response.json()} + Should Be Equal As Strings ${responseJson['name']} ${ranSchemaSetName} + Should Be Equal As Strings ${responseJson['dataspaceName']} ${ranDataspaceName} -- cgit 1.2.3-korg