Get File List
GET_FILELIST
See the source code.
This test verifies that file lists are correctly generated for valid directory paths, including subdirectory traversal, and that appropriate errors are returned for invalid paths.
Case 1: Default path ($BASE)
Frontend sends: FILE_LIST_REQUEST
directory = "$BASE" filter_mode = 0
Backend returns: FILE_LIST_RESPONSE (
FileListResponse)
Check 1: the FILE_LIST_RESPONSE should satisfy:
FILE_LIST_RESPONSE.success = True
FILE_LIST_RESPONSE.subdirectories[] should contain “set_QA”
Case 2: QA subdirectory
Frontend sends: FILE_LIST_REQUEST
directory = "<basepath>/set_QA" filter_mode = 0
Backend returns: FILE_LIST_RESPONSE
Check 2: the FILE_LIST_RESPONSE should satisfy:
FILE_LIST_RESPONSE.success = True
FILE_LIST_RESPONSE.directory contains “set_QA”
FILE_LIST_RESPONSE.files[] should contain “M17_SWex.fits”
FILE_LIST_RESPONSE.subdirectories[] should contain “tmp”
Case 3: Nested subdirectory
Frontend sends: FILE_LIST_REQUEST
directory = "<basepath>/set_QA/tmp" filter_mode = 0
Backend returns: FILE_LIST_RESPONSE
Check 3: the FILE_LIST_RESPONSE should satisfy:
FILE_LIST_RESPONSE.success = True
FILE_LIST_RESPONSE.directory contains “set_QA/tmp”
FILE_LIST_RESPONSE.parent = “set_QA”
Case 4: Invalid path
Frontend sends: FILE_LIST_REQUEST
directory = "/unknown/path" filter_mode = 0
Check 4: the FILE_LIST_RESPONSE should return error:
Error message should contain “File list failed”
GET_FILELIST_ROOTPATH_CONCURRENT
See the source code.
This test verifies that multiple concurrent clients (10 connections) all receive identical file lists when querying the root path.
10 clients each send: REGISTER_VIEWER (
RegisterViewer)session_id = 0 client_feature_flags = WEB_ASSEMBLY | WEB_GL
Each client sends: FILE_LIST_REQUEST
directory = "$BASE"
Backend returns: FILE_LIST_RESPONSE for each client
Check 1: every FILE_LIST_RESPONSE should satisfy:
FILE_LIST_RESPONSE.success = True
All 10 FILE_LIST_RESPONSE.files[] are identical across clients
All 10 FILE_LIST_RESPONSE.subdirectories[] are identical across clients