X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=blobdiff_plain;f=robot-systest%2Flib%2Fuser_lib.robot;fp=robot-systest%2Flib%2Fuser_lib.robot;h=0000000000000000000000000000000000000000;hp=4e5893c114ca8b6ca487335ffff0e639ede932b8;hb=7a9e031926d2fa7ed5041485b3d41b0c1e85d2a9;hpb=23ff8f980f66ef57fb4d254336a018e3a697a187 diff --git a/robot-systest/lib/user_lib.robot b/robot-systest/lib/user_lib.robot deleted file mode 100644 index 4e5893c..0000000 --- a/robot-systest/lib/user_lib.robot +++ /dev/null @@ -1,65 +0,0 @@ -# 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. - -*** Variables *** -${success_return_code} 0 - - -*** Keywords *** -Create User - [Arguments] ${user_name} ${user_password} - - Should Not Be Empty ${user_name} - Should Not Be Empty ${user_password} - ${rc} ${stdout}= Run and Return RC and Output osm user-create ${user_name} --password ${user_password} - Log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} - - -Update User Password - [Arguments] ${user_name} ${user_password} ${user_new_password} - - Should Not Be Empty ${user_name} - Should Not Be Empty ${user_password} - Should Not Be Empty ${user_new_password} - ${rc} ${stdout}= Run and Return RC and Output osm user-update ${user_name} --current-password ${user_password} --new-password ${user_new_password} - Log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Update User Role - [Arguments] ${user_name} ${project_name} ${role_name} - - Should Not Be Empty ${user_name} - Should Not Be Empty ${project_name} - Should Not Be Empty ${role_name} - ${rc} ${stdout}= Run and Return RC and Output osm user-update --add-project-role '${project_name},${role_name}' ${user_name} - Log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Check If User Exists - [Arguments] ${user_name} - - Should Not Be Empty ${user_name} - ${rc} ${stdout}= Run And Return RC And Output osm user-list | awk 'NR>3 {print $2}' | grep "${user_name}" - Log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete User - [Arguments] ${user_name} - - ${rc} ${stdout}= Run and Return RC and Output osm user-delete ${user_name} - Log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code}