Skip to content

Commit aca6ad5

Browse files
fix: remove private registry URL from public codebase
Use generic public registry examples (ghcr.io, docker.io, registry.example.com) instead of private URLs.
1 parent adadf12 commit aca6ad5

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

Tests/Container-Compose-DynamicTests/ComposeAdvancedTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ final class ComposeAdvancedTests {
2424
Database tests require an OCI container registry accessible via HTTPS.
2525
Apple Container does not support HTTP for RFC1918 private IPs.
2626
27-
Options:
28-
1. Set OCI_REGISTRY_URL to your registry (e.g., registry.example.com or registry.example.com)
29-
2. Use a public registry like docker.io
30-
31-
Example: OCI_REGISTRY_URL=registry.example.com swift test
27+
Examples:
28+
- OCI_REGISTRY_URL=registry.example.com swift test
29+
- OCI_REGISTRY_URL=ghcr.io swift test
30+
- OCI_REGISTRY_URL=docker.io swift test
3231
""")
3332
}
3433
return registryURL
@@ -491,7 +490,7 @@ final class ComposeAdvancedTests {
491490

492491
// MARK: - Database Container Tests
493492
// Requires OCI_REGISTRY_URL environment variable (Apple Container doesn't support HTTP for RFC1918 IPs)
494-
// Example: OCI_REGISTRY_URL=registry.example.com swift test
493+
// Example: OCI_REGISTRY_URL=ghcr.io swift test
495494

496495
@Test("Test database container starts without volume mount issues")
497496
func testDatabaseContainerStarts() async throws {

docs/DYNAMIC_TEST_PATTERNS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,18 @@ Tests that depend on external images (like `pgmicro`) face:
226226
// ComposeAdvancedTests.swift
227227
private func requireRegistryURL() throws -> String {
228228
guard let registryURL = ProcessInfo.processInfo.environment["OCI_REGISTRY_URL"] else {
229-
throw Errors.registryNotConfigured("...")
229+
throw Errors.registryNotConfigured("""
230+
OCI_REGISTRY_URL environment variable is not set.
231+
...
232+
""")
230233
}
231234
return registryURL
232235
}
233236
```
234237

235238
Run with custom registry:
236239
```bash
237-
OCI_REGISTRY_URL=registry.example.com swift test
240+
OCI_REGISTRY_URL=ghcr.io swift test
238241
```
239242

240243
---

0 commit comments

Comments
 (0)