harbor/tests/resources/Harbor-Pages/Logs.robot
Yang Jiao 0ec167a7c1
Add audit log and log rotation test cases (#17465)
1. Add audit log test case
2. Add log rotation test case
3. Add log rotation schedule test case

Signed-off-by: Yang Jiao <jiaoya@vmware.com>

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-26 18:00:12 +08:00

36 lines
1.5 KiB
Plaintext

# Copyright Project Harbor Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
*** Settings ***
Documentation This resource provides any keywords related to the Harbor private registry appliance
Resource ../../resources/Util.robot
*** Keywords ***
Switch To Logs
Retry Element Click ${logs_xpath}
Refresh Logs
Retry Element Click ${logs_refresh_btn}
Verify Log
[Arguments] ${username} ${resource} ${resource_type} ${operation} ${row_num}=1
Refresh Logs
${real_username}= Get Text //clr-datagrid//clr-dg-row[${row_num}]//clr-dg-cell[1]
${real_resource}= Get Text //clr-datagrid//clr-dg-row[${row_num}]//clr-dg-cell[2]
${real_resource_type}= Get Text //clr-datagrid//clr-dg-row[${row_num}]//clr-dg-cell[3]
${real_operation}= Get Text //clr-datagrid//clr-dg-row[${row_num}]//clr-dg-cell[4]
Should Be Equal ${real_username} ${username}
Should Be Equal ${real_resource} ${resource}
Should Be Equal ${real_resource_type} ${resource_type}
Should Be Equal ${real_operation} ${operation}