File tree Expand file tree Collapse file tree
Tests/Container-Compose-DynamicTests Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -226,15 +226,18 @@ Tests that depend on external images (like `pgmicro`) face:
226226// ComposeAdvancedTests.swift
227227private 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
235238Run 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---
You can’t perform that action at this time.
0 commit comments