Skip to content
Open

Dev/uat #4241

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.idea/
/docs/build/
**/__pycache__/
.venv
.venv
.vscode/
21 changes: 21 additions & 0 deletions build_stream/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Example environment configuration for UAT tests
# Copy this file to .env and update with your values

# Required: Registration password for OAuth client registration
BUILD_STREAM_AUTH_PASSWORD=dell1234

# Optional: Override server URL (defaults to http://localhost:8000)
BUILD_STREAM_BASE_URL=https://182.10.5.157:8010

# Optional: Override auth username (defaults to build_stream_registrar)
BUILD_STREAM_AUTH_USERNAME=admin

# Optional: Override client name (defaults to uat-test-client)
# BUILD_STREAM_CLIENT_NAME=uat-test-client

# Optional: Override client ID and secret (for existing clients)
BUILD_STREAM_CLIENT_ID=bld_57b2ac8e855da60ec06c2315b3e41d9d
BUILD_STREAM_CLIENT_SECRET=bld_s_XjsqZSNAmHTXNOkIALl7BPczeGVDs75ZlEg1rvoHHfQ

# Optional: Override client scopes (comma-separated)
BUILD_STREAM_CLIENT_SCOPES=catalog:read,catalog:write,job:write
27 changes: 26 additions & 1 deletion build_stream/.env.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Example environment configuration for Tests

# This file can be used with: python -m pytest --env-file .env.test or
# Copy this file to .env and update with your values

# Test environment variables for PostgreSQL integration tests
# This file can be used with: python -m pytest --env-file .env.test

# Database connection for integration tests
TEST_DATABASE_URL=postgresql://admin:dell1234@localhost:5432/build_stream_db
Expand All @@ -8,3 +12,24 @@ DATABASE_URL=postgresql://admin:dell1234@localhost:5432/build_stream_db
# Alternative: Use environment-specific config
# For production container: postgresql://{{ postgres_user }}:{{ postgres_password }}@localhost:5432/{{ postgres_db_name }}
# For local development: postgresql://admin:dell1234@localhost:5432/build_stream_db

# Example environment configuration for UAT tests

# Optional: Override server URL (defaults to http://localhost:8000)
BUILD_STREAM_BASE_URL=https://182.10.0.100:8010

# Optional: Override auth username (defaults to build_stream_registrar)
BUILD_STREAM_AUTH_USERNAME=admin

# Required: Registration password for OAuth client registration
BUILD_STREAM_AUTH_PASSWORD=Test@1234

# Optional: Override client name (defaults to uat-test-client)
# BUILD_STREAM_CLIENT_NAME=uat-test-client

# Optional: Override client ID and secret (for existing clients)
BUILD_STREAM_CLIENT_ID=<your_client_id>
BUILD_STREAM_CLIENT_SECRET=<your_client_secret>

# Optional: Override client scopes (comma-separated)
# BUILD_STREAM_CLIENT_SCOPES=catalog:read,catalog:write,job:write
3 changes: 2 additions & 1 deletion build_stream/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ markers =
unit: marks tests as unit tests
integration: marks tests as integration tests
e2e: marks tests as end-to-end tests
uat: marks tests as user acceptance tests (requires infra ready)
env =
ENV = dev
TEST_DATABASE_URL = postgresql://admin:dell1234@localhost:5432/build_stream_db
DATABASE_URL = postgresql://admin:dell1234@localhost:5432/build_stream_db
DATABASE_URL = postgresql://admin:dell1234@localhost:5432/build_stream_db
25 changes: 25 additions & 0 deletions build_stream/tests/uat/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""User Acceptance Tests (UAT) for Build Stream API.

These tests assume the API server is already running and configured.
They focus on API contract validation and user workflows without infrastructure setup.

To run UAT tests:
pytest tests/uat/ -v -m uat

Required environment variable:
BUILD_STREAM_AUTH_PASSWORD - Password for OAuth registration
"""
Loading
Loading