-
Notifications
You must be signed in to change notification settings - Fork 235
[rest_gateway] Add management interface endpoints and comprehensive testing #2015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rest_gateway] Add management interface endpoints and comprehensive testing #2015
Conversation
…ehensive testing This PR implements REST endpoint support for new OpenCue management interfaces, adds comprehensive tag management documentation, improves test coverage, and enhances documentation across the board. **New Management Interface Endpoints:** - AllocationInterface: Resource allocation across facilities (#1908) - FilterInterface: Job filtering and routing (#1909) - ActionInterface: Filter action management (#1909) - MatcherInterface: Filter matcher management (#1909) - DependInterface: Job and frame dependencies (#1910) - SubscriptionInterface: Show subscription management (#1911) - LimitInterface: Resource limits (licenses) (#1912) - ServiceInterface: Service definitions (#1913) - ServiceOverrideInterface: Show-specific service overrides (#1913) - TaskInterface: Task and shot management (#1915) - FacilityInterface: Multi-site facility management (#1916) **Tag Management Documentation (Issue #1914):** - Documented host tag endpoints: AddTags, RemoveTags, RenameTag - Documented layer tag endpoints: SetTags - Added comprehensive Tag Management section to REST API reference: * Tag use cases for hosts and layers * Complete workflows with curl examples * Operations comparison table * Best practices for naming and organization * Security considerations and job routing integration - Added test cases for tag endpoints **REST Gateway Changes:** - Updated `main.go` to register all new interface handlers - Added Apache License 2.0 headers to all Go source files - Added comprehensive GoDoc comments for all functions and packages **Testing Improvements:** - Added new test cases to `main_test.go` for management interfaces - Added 4 new test cases for tag endpoints - Created `integration_test.go` with comprehensive coverage: * All OpenCue interfaces * JWT authentication tests (valid, invalid, expired, missing tokens) * Error handling tests (invalid endpoints, malformed JSON) * Response format validation tests * Performance and benchmark tests * CORS validation tests - Created `run_docker_integration_tests.sh` for automated testing - Created `run_tests.sh` for interactive unit testing **Documentation Updates:** - Added comprehensive Testing section to README.md with: * Unit test instructions (Docker and local) * Integration test setup and execution * Benchmark test examples * CI/CD examples * Troubleshooting guide * Best practices for writing tests - Updated docs/_docs/reference/rest-api-reference.md: * Added tag endpoint sections with examples * Added comprehensive Tag Management section - Updated docs/_docs/developer-guide/rest-gateway-development.md - Updated interface counts throughout documentation **Build and Configuration:** - Updated .gitignore to exclude test coverage reports: * coverage.html * integration_coverage.out * integration_coverage.html * *.coverprofile **Test Results:** - All new management interfaces verified working - Tag endpoints documented and tested Closes #1908, #1909, #1910, #1911, #1912, #1913, #1914, #1915, #1916
|
% cd OpenCue/rest_gateway/opencue_gateway |
|
% ./run_docker_integration_tests.sh ==============================================
OpenCue REST Gateway - Docker Integration Tests
==============================================
Step 1: Starting OpenCue stack...
WARN[0003] Found orphan containers ([opencue-rest-gateway-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 4/4
✔ Container opencue-db-1 Running 0.0s
✔ Container opencue-flyway-1 Exited 4.7s
✔ Container opencue-cuebot-1 Healthy 5.2s
✔ Container opencue-rqd-1 Running 0.0s
Step 2: Waiting for services to be ready...
Step 3: Generating JWT secret...
JWT_SECRET: /dWbErPbvg... (hidden)
Step 4: Stopping any existing REST Gateway...
opencue-rest-gateway
Step 5: Starting REST Gateway with JWT_SECRET...
XXX
Step 6: Waiting for REST Gateway to be ready...
[OK] REST Gateway is running and requiring authentication
Step 7: Building test image...
[+] Building 1.0s (17/17) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.95kB 0.0s
=> [internal] load metadata for docker.io/library/rockylinux:9 1.0s
=> [auth] library/rockylinux:pull token for registry-1.docker.io 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 138B 0.0s
=> [build 1/11] FROM docker.io/library/rockylinux:9@sha256:XXX 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 5.70kB 0.0s
=> CACHED [build 2/11] RUN dnf install -y epel-release && dnf --enablerepo=crb install -y wget git protobuf protobuf-devel protobuf-compiler && wget https://go.dev/dl/go1.21.13.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.21.13.linux-amd64.tar.gz && rm go1.21.13.linux-amd64.tar 0.0s
=> CACHED [build 3/11] WORKDIR /app 0.0s
=> CACHED [build 4/11] COPY ./proto /app/proto 0.0s
=> CACHED [build 5/11] COPY ./rest_gateway/opencue_gateway /app/opencue_gateway 0.0s
=> CACHED [build 6/11] WORKDIR /app/opencue_gateway 0.0s
=> CACHED [build 7/11] RUN if [ ! -f go.mod ]; then go mod init opencue_gateway; fi && go mod tidy 0.0s
=> CACHED [build 8/11] RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 github.com/golang-jwt/jwt/v5 google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen 0.0s
=> CACHED [build 9/11] RUN mkdir -p gen/go && protoc -I ../proto/src/ --go_out ./gen/go/ --go_opt paths=source_relative --go-grpc_out ./gen/go/ --go-grpc_opt paths=source_relative ../proto/src/*.proto 0.0s
=> CACHED [build 10/11] RUN protoc -I ../proto/src/ --grpc-gateway_out ./gen/go --grpc-gateway_opt paths=source_relative --grpc-gateway_opt generate_unbound_methods=true ../proto/src/*.proto 0.0s
=> CACHED [build 11/11] RUN go build -o grpc_gateway main.go 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:XXX 0.0s
=> => naming to docker.io/library/opencue-gateway-test 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/lmqx2n5j75zp1z9xhcsp6q8x1
Step 8: Running integration tests...
========================================
=== RUN TestIntegration_JWTAuthentication
=== RUN TestIntegration_JWTAuthentication/ValidToken
=== RUN TestIntegration_JWTAuthentication/InvalidToken
=== RUN TestIntegration_JWTAuthentication/MissingToken
--- PASS: TestIntegration_JWTAuthentication (0.07s)
--- PASS: TestIntegration_JWTAuthentication/ValidToken (0.06s)
--- PASS: TestIntegration_JWTAuthentication/InvalidToken (0.00s)
--- PASS: TestIntegration_JWTAuthentication/MissingToken (0.00s)
=== RUN TestIntegration_ShowInterface
=== RUN TestIntegration_ShowInterface/GetShows
=== RUN TestIntegration_ShowInterface/FindShow
=== RUN TestIntegration_ShowInterface/GetActiveShows
--- PASS: TestIntegration_ShowInterface (0.01s)
--- PASS: TestIntegration_ShowInterface/GetShows (0.00s)
--- PASS: TestIntegration_ShowInterface/FindShow (0.00s)
--- PASS: TestIntegration_ShowInterface/GetActiveShows (0.00s)
=== RUN TestIntegration_JobInterface
=== RUN TestIntegration_JobInterface/GetJobs
--- PASS: TestIntegration_JobInterface (0.02s)
--- PASS: TestIntegration_JobInterface/GetJobs (0.02s)
=== RUN TestIntegration_FrameInterface
integration_test.go:352: Skipping frame tests - no jobs found
--- SKIP: TestIntegration_FrameInterface (0.01s)
=== RUN TestIntegration_LayerInterface
integration_test.go:405: Skipping layer tests - no jobs found
--- SKIP: TestIntegration_LayerInterface (0.00s)
=== RUN TestIntegration_GroupInterface
=== RUN TestIntegration_GroupInterface/GetGroups
--- PASS: TestIntegration_GroupInterface (0.00s)
--- PASS: TestIntegration_GroupInterface/GetGroups (0.00s)
=== RUN TestIntegration_HostInterface
=== RUN TestIntegration_HostInterface/GetHosts
--- PASS: TestIntegration_HostInterface (0.01s)
--- PASS: TestIntegration_HostInterface/GetHosts (0.01s)
=== RUN TestIntegration_OwnerInterface
=== RUN TestIntegration_OwnerInterface/GetOwners
--- PASS: TestIntegration_OwnerInterface (0.00s)
--- PASS: TestIntegration_OwnerInterface/GetOwners (0.00s)
=== RUN TestIntegration_ProcInterface
=== RUN TestIntegration_ProcInterface/GetProcs
--- PASS: TestIntegration_ProcInterface (0.00s)
--- PASS: TestIntegration_ProcInterface/GetProcs (0.00s)
=== RUN TestIntegration_DeedInterface
integration_test.go:513: Skipping deed tests - requires specific test environment setup
--- SKIP: TestIntegration_DeedInterface (0.00s)
=== RUN TestIntegration_CommentInterface
integration_test.go:546: Skipping comment tests - no jobs found
--- SKIP: TestIntegration_CommentInterface (0.01s)
=== RUN TestIntegration_AllocationInterface
=== RUN TestIntegration_AllocationInterface/GetAll
--- PASS: TestIntegration_AllocationInterface (0.00s)
--- PASS: TestIntegration_AllocationInterface/GetAll (0.00s)
=== RUN TestIntegration_FacilityInterface
=== RUN TestIntegration_FacilityInterface/Get
--- PASS: TestIntegration_FacilityInterface (0.00s)
--- PASS: TestIntegration_FacilityInterface/Get (0.00s)
=== RUN TestIntegration_FilterInterface
=== RUN TestIntegration_FilterInterface/GetFilters
--- PASS: TestIntegration_FilterInterface (0.00s)
--- PASS: TestIntegration_FilterInterface/GetFilters (0.00s)
=== RUN TestIntegration_DependInterface
integration_test.go:656: Skipping depend tests - requires jobs with dependencies
--- SKIP: TestIntegration_DependInterface (0.00s)
=== RUN TestIntegration_SubscriptionInterface
=== RUN TestIntegration_SubscriptionInterface/GetSubscriptions
--- PASS: TestIntegration_SubscriptionInterface (0.00s)
--- PASS: TestIntegration_SubscriptionInterface/GetSubscriptions (0.00s)
=== RUN TestIntegration_LimitInterface
=== RUN TestIntegration_LimitInterface/GetAll
--- PASS: TestIntegration_LimitInterface (0.00s)
--- PASS: TestIntegration_LimitInterface/GetAll (0.00s)
=== RUN TestIntegration_ServiceInterface
=== RUN TestIntegration_ServiceInterface/GetDefaultServices
--- PASS: TestIntegration_ServiceInterface (0.00s)
--- PASS: TestIntegration_ServiceInterface/GetDefaultServices (0.00s)
=== RUN TestIntegration_TaskInterface
integration_test.go:741: Skipping task tests - requires show/shot setup
--- SKIP: TestIntegration_TaskInterface (0.00s)
=== RUN TestIntegration_ErrorHandling
=== RUN TestIntegration_ErrorHandling/InvalidEndpoint
=== RUN TestIntegration_ErrorHandling/MalformedJSON
=== RUN TestIntegration_ErrorHandling/InvalidShowName
--- PASS: TestIntegration_ErrorHandling (0.00s)
--- PASS: TestIntegration_ErrorHandling/InvalidEndpoint (0.00s)
--- PASS: TestIntegration_ErrorHandling/MalformedJSON (0.00s)
--- PASS: TestIntegration_ErrorHandling/InvalidShowName (0.00s)
=== RUN TestIntegration_ResponseFormat
=== RUN TestIntegration_ResponseFormat/ValidJSONResponse
=== RUN TestIntegration_ResponseFormat/ContentTypeHeader
--- PASS: TestIntegration_ResponseFormat (0.00s)
--- PASS: TestIntegration_ResponseFormat/ValidJSONResponse (0.00s)
--- PASS: TestIntegration_ResponseFormat/ContentTypeHeader (0.00s)
=== RUN TestIntegration_Performance
=== RUN TestIntegration_Performance/ResponseTime
integration_test.go:867: Response time: 2.372958ms
=== RUN TestIntegration_Performance/ConcurrentRequests
integration_test.go:903: Successful concurrent requests: 10/10
--- PASS: TestIntegration_Performance (0.03s)
--- PASS: TestIntegration_Performance/ResponseTime (0.00s)
--- PASS: TestIntegration_Performance/ConcurrentRequests (0.02s)
=== RUN TestIntegration_CORS
=== RUN TestIntegration_CORS/CORSHeaders
integration_test.go:940: CORS Allow-Origin:
--- PASS: TestIntegration_CORS (0.00s)
--- PASS: TestIntegration_CORS/CORSHeaders (0.00s)
=== RUN TestJwtMiddleware
=== RUN TestJwtMiddleware/Valid_Token
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestJwtMiddleware/Missing_Token
2025/10/01 04:56:28 Authorization header required
=== RUN TestJwtMiddleware/Invalid_Token
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 Token validation error: token is malformed: token contains an invalid number of segments
=== RUN TestJwtMiddleware/Expired_Token
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validation error: token has invalid claims: token is expired
--- PASS: TestJwtMiddleware (0.01s)
--- PASS: TestJwtMiddleware/Valid_Token (0.01s)
--- PASS: TestJwtMiddleware/Missing_Token (0.00s)
--- PASS: TestJwtMiddleware/Invalid_Token (0.00s)
--- PASS: TestJwtMiddleware/Expired_Token (0.00s)
=== RUN TestRegisteredEndpoints
=== RUN TestRegisteredEndpoints/ShowInterface-FindShow
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ShowInterface-GetShows
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ShowInterface-CreateShow
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-FindJob
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-GetJobs
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-GetComments
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-Kill
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-Pause
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/JobInterface-Resume
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FrameInterface-GetFrame
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FrameInterface-Retry
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FrameInterface-Kill
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FrameInterface-Eat
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LayerInterface-GetLayer
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LayerInterface-FindLayer
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LayerInterface-GetFrames
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LayerInterface-Kill
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LayerInterface-SetTags
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/GroupInterface-FindGroup
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/GroupInterface-GetGroup
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/GroupInterface-SetMinCores
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/GroupInterface-SetMaxCores
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-FindHost
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-GetHost
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-GetComments
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-Lock
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-Unlock
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-AddTags
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-RemoveTags
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/HostInterface-RenameTag
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/OwnerInterface-GetOwner
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/OwnerInterface-SetMaxCores
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/OwnerInterface-TakeOwnership
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ProcInterface-GetProc
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ProcInterface-Kill
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ProcInterface-Unbook
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/DeedInterface-GetOwner
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/DeedInterface-GetHost
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/AllocationInterface-GetAll
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/AllocationInterface-Get
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/AllocationInterface-Find
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/AllocationInterface-GetHosts
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/AllocationInterface-SetBillable
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FacilityInterface-Get
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FacilityInterface-Create
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FacilityInterface-GetAllocations
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FilterInterface-FindFilter
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FilterInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FilterInterface-GetActions
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FilterInterface-GetMatchers
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/FilterInterface-SetEnabled
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ActionInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ActionInterface-Commit
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/MatcherInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/MatcherInterface-Commit
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/DependInterface-GetDepend
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/DependInterface-Satisfy
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/DependInterface-Unsatisfy
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/SubscriptionInterface-Get
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/SubscriptionInterface-Find
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/SubscriptionInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/SubscriptionInterface-SetSize
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/SubscriptionInterface-SetBurst
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-GetAll
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-Get
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-Find
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-Create
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/LimitInterface-SetMaxValue
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceInterface-GetService
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceInterface-GetDefaultServices
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceInterface-CreateService
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceInterface-Update
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceOverrideInterface-Update
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/ServiceOverrideInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/TaskInterface-Delete
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/TaskInterface-SetMinCores
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestRegisteredEndpoints/TaskInterface-ClearAdjustments
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
--- PASS: TestRegisteredEndpoints (0.02s)
--- PASS: TestRegisteredEndpoints/ShowInterface-FindShow (0.00s)
--- PASS: TestRegisteredEndpoints/ShowInterface-GetShows (0.00s)
--- PASS: TestRegisteredEndpoints/ShowInterface-CreateShow (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-FindJob (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-GetJobs (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-GetComments (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-Kill (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-Pause (0.00s)
--- PASS: TestRegisteredEndpoints/JobInterface-Resume (0.00s)
--- PASS: TestRegisteredEndpoints/FrameInterface-GetFrame (0.00s)
--- PASS: TestRegisteredEndpoints/FrameInterface-Retry (0.00s)
--- PASS: TestRegisteredEndpoints/FrameInterface-Kill (0.00s)
--- PASS: TestRegisteredEndpoints/FrameInterface-Eat (0.00s)
--- PASS: TestRegisteredEndpoints/LayerInterface-GetLayer (0.00s)
--- PASS: TestRegisteredEndpoints/LayerInterface-FindLayer (0.00s)
--- PASS: TestRegisteredEndpoints/LayerInterface-GetFrames (0.00s)
--- PASS: TestRegisteredEndpoints/LayerInterface-Kill (0.00s)
--- PASS: TestRegisteredEndpoints/LayerInterface-SetTags (0.00s)
--- PASS: TestRegisteredEndpoints/GroupInterface-FindGroup (0.00s)
--- PASS: TestRegisteredEndpoints/GroupInterface-GetGroup (0.00s)
--- PASS: TestRegisteredEndpoints/GroupInterface-SetMinCores (0.00s)
--- PASS: TestRegisteredEndpoints/GroupInterface-SetMaxCores (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-FindHost (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-GetHost (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-GetComments (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-Lock (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-Unlock (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-AddTags (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-RemoveTags (0.00s)
--- PASS: TestRegisteredEndpoints/HostInterface-RenameTag (0.00s)
--- PASS: TestRegisteredEndpoints/OwnerInterface-GetOwner (0.00s)
--- PASS: TestRegisteredEndpoints/OwnerInterface-SetMaxCores (0.00s)
--- PASS: TestRegisteredEndpoints/OwnerInterface-TakeOwnership (0.00s)
--- PASS: TestRegisteredEndpoints/ProcInterface-GetProc (0.00s)
--- PASS: TestRegisteredEndpoints/ProcInterface-Kill (0.00s)
--- PASS: TestRegisteredEndpoints/ProcInterface-Unbook (0.00s)
--- PASS: TestRegisteredEndpoints/DeedInterface-GetOwner (0.00s)
--- PASS: TestRegisteredEndpoints/DeedInterface-GetHost (0.00s)
--- PASS: TestRegisteredEndpoints/AllocationInterface-GetAll (0.00s)
--- PASS: TestRegisteredEndpoints/AllocationInterface-Get (0.00s)
--- PASS: TestRegisteredEndpoints/AllocationInterface-Find (0.00s)
--- PASS: TestRegisteredEndpoints/AllocationInterface-GetHosts (0.00s)
--- PASS: TestRegisteredEndpoints/AllocationInterface-SetBillable (0.00s)
--- PASS: TestRegisteredEndpoints/FacilityInterface-Get (0.00s)
--- PASS: TestRegisteredEndpoints/FacilityInterface-Create (0.00s)
--- PASS: TestRegisteredEndpoints/FacilityInterface-GetAllocations (0.00s)
--- PASS: TestRegisteredEndpoints/FilterInterface-FindFilter (0.00s)
--- PASS: TestRegisteredEndpoints/FilterInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/FilterInterface-GetActions (0.00s)
--- PASS: TestRegisteredEndpoints/FilterInterface-GetMatchers (0.00s)
--- PASS: TestRegisteredEndpoints/FilterInterface-SetEnabled (0.00s)
--- PASS: TestRegisteredEndpoints/ActionInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/ActionInterface-Commit (0.00s)
--- PASS: TestRegisteredEndpoints/MatcherInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/MatcherInterface-Commit (0.00s)
--- PASS: TestRegisteredEndpoints/DependInterface-GetDepend (0.00s)
--- PASS: TestRegisteredEndpoints/DependInterface-Satisfy (0.00s)
--- PASS: TestRegisteredEndpoints/DependInterface-Unsatisfy (0.00s)
--- PASS: TestRegisteredEndpoints/SubscriptionInterface-Get (0.00s)
--- PASS: TestRegisteredEndpoints/SubscriptionInterface-Find (0.00s)
--- PASS: TestRegisteredEndpoints/SubscriptionInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/SubscriptionInterface-SetSize (0.00s)
--- PASS: TestRegisteredEndpoints/SubscriptionInterface-SetBurst (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-GetAll (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-Get (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-Find (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-Create (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/LimitInterface-SetMaxValue (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceInterface-GetService (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceInterface-GetDefaultServices (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceInterface-CreateService (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceInterface-Update (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceOverrideInterface-Update (0.00s)
--- PASS: TestRegisteredEndpoints/ServiceOverrideInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/TaskInterface-Delete (0.00s)
--- PASS: TestRegisteredEndpoints/TaskInterface-SetMinCores (0.00s)
--- PASS: TestRegisteredEndpoints/TaskInterface-ClearAdjustments (0.00s)
=== RUN TestRegisterGRPCHandlers
2025/10/01 04:56:28 Registering gRPC handlers
2025/10/01 04:56:28 All gRPC handlers registered
--- PASS: TestRegisterGRPCHandlers (0.01s)
=== RUN TestEndpointHTTPMethods
=== RUN TestEndpointHTTPMethods/Method_GET
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestEndpointHTTPMethods/Method_PUT
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestEndpointHTTPMethods/Method_DELETE
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestEndpointHTTPMethods/Method_PATCH
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestEndpointHTTPMethods/Method_POST
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
--- PASS: TestEndpointHTTPMethods (0.00s)
--- PASS: TestEndpointHTTPMethods/Method_GET (0.00s)
--- PASS: TestEndpointHTTPMethods/Method_PUT (0.00s)
--- PASS: TestEndpointHTTPMethods/Method_DELETE (0.00s)
--- PASS: TestEndpointHTTPMethods/Method_PATCH (0.00s)
--- PASS: TestEndpointHTTPMethods/Method_POST (0.00s)
=== RUN TestContentTypeValidation
=== RUN TestContentTypeValidation/ValidContentType
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
=== RUN TestContentTypeValidation/InvalidContentType
2025/10/01 04:56:28 Validating JWT token
2025/10/01 04:56:28 JWT signing method validated
2025/10/01 04:56:28 Token validated successfully; passing request to next handler
--- PASS: TestContentTypeValidation (0.00s)
--- PASS: TestContentTypeValidation/ValidContentType (0.00s)
--- PASS: TestContentTypeValidation/InvalidContentType (0.00s)
PASS
ok opencue_gateway 0.253s
========================================
[OK] All integration tests passed!
To view REST Gateway logs:
docker logs opencue-rest-gateway
To stop services:
docker rm -f opencue-rest-gateway
docker compose down``` |
|
@DiegoTavares / @lithorus |
|
Wouldn't it make sense to add the rest gateway tests to the PR testing workflow? |
Yes. It is in my to do list. I created this issue assigned to me now Let's close this PR (missing approval) and I will update the CI/CD later. I need the rest_gateway code to work on the new CueWeb changes. See PR Thanks, @lithorus |
48b7053
into
AcademySoftwareFoundation:master
Link the Issue(s) this Pull Request is related to.
Summarize your change.
[rest_gateway] Add management endpoints, tag documentation, and comprehensive testing
Implements REST endpoint support for new OpenCue management interfaces, adds comprehensive tag management documentation, improves test coverage, and enhances documentation across the board.
New Management Interface Endpoints:
Tag Management Documentation (Issue #1914):
REST Gateway Changes:
main.goto register all new interface handlersTesting Improvements:
main_test.gofor management interfacesintegration_test.gowith comprehensive coverage:run_docker_integration_tests.shfor automated testingrun_tests.shfor interactive unit testingDocumentation Updates:
Build and Configuration:
Test Results:
Closes #1908, #1909, #1910, #1911, #1912, #1913, #1914, #1915, #1916