7
7
{{ $ns := .Values.mas_app_namespace }}
8
8
{{ $np_name := "postsync-sanity-manage-np" }}
9
9
{{ $role_name := "postsync-sanity-manage-role" }}
10
- {{ $crole_name := "postsync-verify -manage-crole" }}
11
- {{ $sa_name := "postsync-sanity-manage-sa" }}
10
+ {{ $crole_name := printf "postsync-sanity -manage-crole-%s" .Values.instance_id }}
11
+ {{ $sa_name := printf "postsync-sanity-manage-sa-%s" .Values.instance_id }}
12
12
{{ $rb_name := "postsync-sanity-manage-rb" }}
13
- {{ $crb_name := "postsync-verify -manage-crb" }}
13
+ {{ $crb_name := printf "postsync-sanity -manage-crb-%s" .Values.instance_id }}
14
14
{{ $tests_cm_name := "postsync-sanity-tests-manage-cm" }}
15
15
{{ $record_cm_name := "postsync-sanity-tests-manage-record-cm" }}
16
16
{{ $job_name := "postsync-sanity-manage-job" }}
@@ -915,9 +915,6 @@ data:
915
915
def test_asset_crud_operation_using_new_added_user(manage_host_ca_filepath):
916
916
#Check if asset exists, delete it if present
917
917
assetid = get_asset(asset, session, manage_host_ca_filepath)
918
- if assetid is not None:
919
- logger.info("assetid not none")
920
- delete_asset(assetid,session)
921
918
# Create Asset
922
919
create_asset(asset, session, manage_host_ca_filepath)
923
920
# Get Asset id for newly created Asset
@@ -927,8 +924,6 @@ data:
927
924
time.sleep(20)
928
925
# Update newly created Asset
929
926
update_asset(assetid, session, manage_host_ca_filepath)
930
- # Delete newly created Asset
931
- delete_asset(assetid, session, manage_host_ca_filepath)
932
927
933
928
def get_asset(asset, session, manage_host_ca_filepath):
934
929
asset_url = f'''{MANAGE_URL}/maximo/api/os/mxapiasset?lean=1&oslc.select=assetnum&oslc.where=assetnum%3D%22{asset}%22'''
@@ -982,6 +977,7 @@ data:
982
977
logger.info(response.text)
983
978
assert_that(response.status_code).is_equal_to(204)
984
979
980
+ # This function only works if a dbc has been loaded to allow delete of assets
985
981
def delete_asset(assetid, session, manage_host_ca_filepath):
986
982
asset_url = MANAGE_URL+"/maximo/api/os/mxapiasset/"+assetid
987
983
querystring = {"lean":"1"}
0 commit comments