-
Notifications
You must be signed in to change notification settings - Fork 0
/
SrmspaceTests.robot
54 lines (45 loc) · 1.67 KB
/
SrmspaceTests.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
43
44
45
46
47
48
49
50
51
52
53
54
*** Settings ***
Variables UserDefinedVariables.py
Resource UserKeywords.robot
Library String
Library OperatingSystem
Library DoorTesterLib.py ${HOST}
Library ProtocolTesterLib.py
Suite Setup TEST PROTOCOL DOOR ${PROTOCOL} ${PORT}
Suite Teardown REMOVE LOCAL AND REMOTE FILES WITH NAMES CONTAINING testfile remotetest
*** Variables ***
${CLIENT} srm-get-space-tokens
${PROTOCOL} srm
${PORT} ${PROTOCOL_PORTS}[${PROTOCOL}]
${SPACE_DESC} robot-g2-testspace
*** Test Cases ***
GET SPACE TOKENS
[Documentation] Checks if it can get space tokens from the host
SET CLIENT srm-reserve-space
SET PROTOCOL ${PROTOCOL} ${PORT}
SET HOST ${HOST}
SET EXTRA ARGUMENTS -retry_num=0
${SPACE_TOKEN}= RESERVE SPACE ${SPACE_DESC} guaranteed_size=2 retention_policy=REPLICA
COMMAND SHOULD EXECUTE SUCCESSFULLY
SET CLIENT srm-get-space-tokens
GET SPACE TOKENS space_desc=${SPACE_DESC}
COMMAND SHOULD EXECUTE SUCCESSFULLY
SET CLIENT srm-release-space
RELEASE SPACE ${SPACE_TOKEN}
COMMAND SHOULD EXECUTE SUCCESSFULLY
PUT REMOVED
[Documentation] (Weird test, ported from G2) Copies a file then removes it and then copies it again.
SET CLIENT srmcp
SET PROTOCOL ${PROTOCOL} ${PORT}
SET HOST ${HOST}
SET EXTRA ARGUMENTS -retry_num=0
${FILE_NAME}= REPLACE STRING ${TEST NAME} ${SPACE} ${EMPTY}
CREATE FILE ${LOCAL_FILE}${FILE_NAME} This is a testfile for ${TEST NAME}
COPY LOCAL FILE ${LOCAL_FILE}${FILE_NAME} ${REMOTE_FILE}${FILE_NAME}
COMMAND SHOULD EXECUTE SUCCESSFULLY
SET CLIENT srmrm
REMOVE REMOTE FILE ${REMOTE_FILE}${FILE_NAME}
COMMAND SHOULD EXECUTE SUCCESSFULLY
SET CLIENT srmcp
COPY LOCAL FILE ${LOCAL_FILE}${FILE_NAME} ${REMOTE_FILE}${FILE_NAME}
COMMAND SHOULD EXECUTE SUCCESSFULLY