-
Notifications
You must be signed in to change notification settings - Fork 0
/
GeneralFileCopyTests.robot
45 lines (32 loc) · 1.53 KB
/
GeneralFileCopyTests.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
*** Settings ***
Variables UserDefinedVariables.py
Resource UserKeywords.robot
Library OperatingSystem
Library Collections
Library ProtocolTesterLib.py
Library DoorTesterLib.py ${HOST}
Library FileTesterLib.py
Suite Setup CHECK IF DOORS ARE OPEN ${PROTOCOL_PORTS}
Suite Teardown REMOVE LOCAL AND REMOTE FILES WITH NAMES CONTAINING localfile remotefile
Test Template COPY FILE WITH CLIENT AND PROTOCOL
*** Test Cases ***
SRMCP srmcp srm ${LOCAL_FILE} ${REMOTE_FILE}
DCCP dccp gsidcap ${LOCAL_FILE} ${REMOTE_FILE} EXTRA_ARGUMENTS=-A
GLOBUS gfal-copy gsiftp ${LOCAL_FILE} ${REMOTE_FILE}
ARCCP arccp srm ${LOCAL_FILE} ${REMOTE_FILE}
*** Keywords ***
COPY FILE WITH CLIENT AND PROTOCOL
[Documentation] General test case structure for copying a file with a specific client using a specific protocol
[Arguments] ${CLIENT} ${PROTOCOL} ${LOCAL_FILE} ${REMOTE_FILE} ${EXTRA_ARGUMENTS}=${EMPTY} ${PROTOCOL_PORT}=-1
CREATE FILE ${LOCAL_FILE}${TEST NAME} This is a testfile for ${TEST NAME}
SET CLIENT ${CLIENT}
${PORT}= SET VARIABLE ${PROTOCOL_PORT}
${PORT}= RUN KEYWORD IF ${PROTOCOL_PORT} < 0 GET FROM DICTIONARY ${PROTOCOL_PORTS} ${PROTOCOL}
SET PROTOCOL ${PROTOCOL} ${PORT}
SET EXTRA ARGUMENTS ${EXTRA_ARGUMENTS}
SET HOST ${HOST}
COPY LOCAL FILE ${LOCAL_FILE}${TEST NAME} ${REMOTE_FILE}${TEST NAME}
COMMAND SHOULD EXECUTE SUCCESSFULLY
COPY REMOTE FILE ${REMOTE_FILE}${TEST NAME} ${LOCAL_FILE}${TEST NAME}1
COMMAND SHOULD EXECUTE SUCCESSFULLY
FILES SHOULD BE THE SAME ${LOCAL_FILE}${TEST NAME} ${LOCAL_FILE}${TEST NAME}1