X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftests%2Ftest_std_1_1_3.py;h=7599b4a896a56cebbb2b01374a9e43317e3ba5ee;hb=3c47934969cb887007ad96d71906598a9a4bf0cc;hp=0d2959a6ee7e64b507a4828e59f9d4ea83a60da9;hpb=868107297d275a6f50790a5e6d3de6c65cbd4a3e;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/tests/test_std_1_1_3.py b/near-rt-ric-simulator/tests/test_std_1_1_3.py index 0d2959a..7599b4a 100644 --- a/near-rt-ric-simulator/tests/test_std_1_1_3.py +++ b/near-rt-ric-simulator/tests/test_std_1_1_3.py @@ -1,5 +1,5 @@ # ============LICENSE_START=============================================== -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# Copyright (C) 2021 Nordix Foundation. All rights reserved. # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ def test_apis(client): # Check used and implemented interfaces response=client.get(SERVER_URL+'container_interfaces') assert response.status_code == 200 - assert response.data == b"Current interface: STD_1.1.3 All supported A1 interface yamls in this container: ['OSC_2.1.0', 'STD_1.1.3']" + assert response.data == b"Current interface: STD_1.1.3 All supported A1 interface yamls in this container: ['OSC_2.1.0', 'STD_1.1.3', 'STD_2.0.0']" # Reset simulator instances response=client.post(SERVER_URL+'deleteinstances') @@ -110,18 +110,17 @@ def test_apis(client): res=compare(data_policy_get, result) assert res == True - # API: Create policy instance pi2 (copy of pi1). Shall fail - data_create_errror_pi1 = { - "title" : "The policy json already exists.", - "status" : 400, - "instance" : "pi2" - } - response=client.put(SERVER_URL+'A1-P/v1/policies/pi2', headers=header, data=json.dumps(data_pi1_updated)) - assert response.status_code == 400 + # API: Create policy instance pi3 (copy of pi1). + response=client.put(SERVER_URL+'A1-P/v1/policies/pi3', headers=header, data=json.dumps(data_pi1)) + assert response.status_code == 201 result=json.loads(response.data) - res=compare(data_create_errror_pi1, result) + res=compare(data_pi1, result) assert res == True + # API: DELETE policy instance pi1 + response=client.delete(SERVER_URL+'A1-P/v1/policies/pi3') + assert response.status_code == 204 + # Set force response code 409. ===" response=client.post(SERVER_URL+'forceresponse?code=409') assert response.status_code == 200