test: add comprehensive unit tests for SegmentService - Fix: #28656 (#28568)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
aka James4u 2025-11-25 17:43:00 -08:00 committed by GitHub
parent 203c2f0456
commit e4ec4e1470
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1098 additions and 1 deletions

View File

@ -295,9 +295,13 @@ class TestAPIBasedExtensionService:
original_name = created_extension.name
original_endpoint = created_extension.api_endpoint
# Update the extension
# Update the extension with guaranteed different values
new_name = fake.company()
# Ensure new endpoint is different from original
new_endpoint = f"https://{fake.domain_name()}/api"
# If by chance they're the same, generate a new one
while new_endpoint == original_endpoint:
new_endpoint = f"https://{fake.domain_name()}/api"
new_api_key = fake.password(length=20)
created_extension.name = new_name

File diff suppressed because it is too large Load Diff