File tree Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 1+ *** Settings ***
2+ Resource keywords.robot
3+ Library RequestsLibrary
4+
5+ *** Variables ***
6+ ${ACTORS_ENDPOINT } ${BASE_URL } /actors
7+ ${RESTART_ACTOR_ENDPOINT } ${ACTORS_ENDPOINT } /Vectordb/restart
8+
9+
10+ *** Test Cases ***
11+
12+ List Ray Actors
13+ ${response } = GET ${ACTORS_ENDPOINT } headers=${HEADERS } expected_status=200
14+ ${json } = Set Variable ${response.json() }
15+ Dictionary Should Contain Key ${json } actors
16+
17+ Restart Vectordb Actor
18+ ${response } = POST ${RESTART_ACTOR_ENDPOINT } headers=${HEADERS } expected_status=200
19+ ${json } = Set Variable ${response.json() }
20+ Dictionary Should Contain Key ${json } message
21+ Should Contain ${json } [message] restarted successfully
22+ Dictionary Should Contain Key ${json } actor_id
Original file line number Diff line number Diff line change @@ -108,8 +108,11 @@ Delete File
108108 RETURN None
109109
110110Delete Partition
111- [Arguments] ${part } ${expected_status } =204
112- ${response } = DELETE ${BASE_URL } /partition/${part } headers=${HEADERS } expected_status=${expected_status }
111+ [Arguments] ${part } ${headers } =${HEADERS } ${expected_status } =204
112+ ${response } = DELETE
113+ ... ${BASE_URL } /partition/${part }
114+ ... headers=${headers }
115+ ... expected_status=${expected_status }
113116 RETURN None
114117
115118Get File Metadata
@@ -146,4 +149,6 @@ Create User
146149 ... data=${form_data }
147150 ... expected_status=${expected_status }
148151 RETURN ${response.json() }
149-
152+
153+ Skip If Auth Disabled
154+ Run Keyword If '${AUTH_TOKEN } ' == 'none' Skip Auth is disabled
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ Create User For OpenAI Tests
3232 Set Suite Variable ${USER_HEADERS } ${user_headers }
3333
3434Create A Partition For The User
35- [Documentation] Admin creates a partition that belongs to the created user.
3635 ${response } = POST ${PARTITIONS_ENDPOINT } /${PARTITION_USER } headers=${USER_HEADERS } expected_status=201
3736
3837
@@ -54,6 +53,7 @@ List Models As Admin
5453
5554List Models As User
5655 [Documentation] Regular user should only see openrag-all and their own openrag-${PARTITION_USER} model.
56+ Skip If Auth Disabled
5757 ${response } = GET ${MODELS_ENDPOINT } headers=${USER_HEADERS } expected_status=200
5858 ${json } = Set Variable ${response.json() }
5959 ${models } = Get From Dictionary ${json } data
@@ -120,6 +120,8 @@ Completion As User
120120# CLEANUP
121121# ==========================================================
122122
123+ Cleanup Partition
124+ Delete Partition ${PARTITION_USER } ${USER_HEADERS }
123125Cleanup User
124126 [Documentation] Delete the user created for the tests.
125127 ${response } = DELETE ${USERS_ENDPOINT } /${USER_ID } headers=${HEADERS } expected_status=204
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ List Partitions As Admin
7373 List Should Contain Value ${partition_names } ${PARTITION_2 }
7474
7575List Partitions As User
76+ Skip If Auth Disabled
7677 &{user_headers } = Create Dictionary Authorization=Bearer ${USER_TOKEN }
7778 ${response } = GET ${PARTITIONS_ENDPOINT } headers=${user_headers } expected_status=200
7879 ${json } = Set Variable ${response.json() }
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ Search Multiple Partitions As Admin
8080
8181Search Multiple Partitions As User With Unauthorized Access
8282 [Documentation] Regular user searches across two partitions, one of which they cannot access → should get 403.
83+ Skip If Auth Disabled
8384 &{user_headers } = Create Dictionary Authorization=Bearer ${USER_TOKEN }
8485 ${partitions_list } = Create List ${PARTITION_1 } ${PARTITION_2 }
8586 ${params } = Create Dictionary
@@ -90,6 +91,7 @@ Search Multiple Partitions As User With Unauthorized Access
9091
9192Search Multiple Partitions As User
9293 [Documentation] Regular user should only see results in partitions they have access to.
94+ Skip If Auth Disabled
9395 &{user_headers } = Create Dictionary Authorization=Bearer ${USER_TOKEN }
9496 ${params } = Create Dictionary
9597 ... partitions=all
@@ -104,6 +106,7 @@ Search Multiple Partitions As User
104106
105107Search Multiple Partitions As User Without Access
106108 [Documentation] When user explicitly queries a partition they don’t own, expect 403 or empty results.
109+ Skip If Auth Disabled
107110 &{user_headers } = Create Dictionary Authorization=Bearer ${USER_TOKEN }
108111 ${params } = Create Dictionary
109112 ... partitions=${PARTITION_2 }
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ Get Deleted User Should Fail
4646 Should Contain ${json } [detail] VDB_USER_NOT_FOUND
4747
4848Unauthorized Access Should Fail
49+ Skip If Auth Disabled
4950 &{bad_headers } = Create Dictionary Authorization=Bearer invalidtoken
5051 ${response } = GET ${USERS_ENDPOINT } headers=${bad_headers } expected_status=403
5152 ${json } = Set Variable ${response.json() }
You can’t perform that action at this time.
0 commit comments