@@ -93,18 +93,16 @@ struct OCIClientTests: ~Copyable {
9393 try await client. ping ( )
9494 }
9595
96- @Test ( . enabled( if: hasRegistryCredentials) )
97- func resolve( ) async throws {
98- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
96+ @Test func resolve( ) async throws {
97+ let client = RegistryClient ( host: " ghcr.io " )
9998 let descriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
10099 #expect( descriptor. mediaType == MediaTypes . dockerManifest)
101100 #expect( descriptor. size != 0 )
102101 #expect( !descriptor. digest. isEmpty)
103102 }
104103
105- @Test ( . enabled( if: hasRegistryCredentials) )
106- func resolveSha( ) async throws {
107- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
104+ @Test func resolveSha( ) async throws {
105+ let client = RegistryClient ( host: " ghcr.io " )
108106 let descriptor = try await client. resolve (
109107 name: " apple/containerization/dockermanifestimage " , tag: " sha256:c8d344d228b7d9a702a95227438ec0d71f953a9a483e28ffabc5704f70d2b61e " )
110108 let namedDescriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
@@ -114,27 +112,24 @@ struct OCIClientTests: ~Copyable {
114112 #expect( !descriptor. digest. isEmpty)
115113 }
116114
117- @Test ( . enabled( if: hasRegistryCredentials) )
118- func fetchManifest( ) async throws {
119- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
115+ @Test func fetchManifest( ) async throws {
116+ let client = RegistryClient ( host: " ghcr.io " )
120117 let descriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
121118 let manifest : Manifest = try await client. fetch ( name: " apple/containerization/dockermanifestimage " , descriptor: descriptor)
122119 #expect( manifest. schemaVersion == 2 )
123120 #expect( manifest. layers. count == 1 )
124121 }
125122
126- @Test ( . enabled( if: hasRegistryCredentials) )
127- func fetchManifestAsData( ) async throws {
128- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
123+ @Test func fetchManifestAsData( ) async throws {
124+ let client = RegistryClient ( host: " ghcr.io " )
129125 let descriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
130126 let manifestData = try await client. fetchData ( name: " apple/containerization/dockermanifestimage " , descriptor: descriptor)
131127 let checksum = SHA256 . hash ( data: manifestData)
132128 #expect( descriptor. digest == checksum. digest)
133129 }
134130
135- @Test ( . enabled( if: hasRegistryCredentials) )
136- func fetchConfig( ) async throws {
137- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
131+ @Test func fetchConfig( ) async throws {
132+ let client = RegistryClient ( host: " ghcr.io " )
138133 let descriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
139134 let manifest : Manifest = try await client. fetch ( name: " apple/containerization/dockermanifestimage " , descriptor: descriptor)
140135 let image : Image = try await client. fetch ( name: " apple/containerization/dockermanifestimage " , descriptor: manifest. config)
@@ -143,9 +138,8 @@ struct OCIClientTests: ~Copyable {
143138 #expect( image. rootfs. diffIDs. count == 1 )
144139 }
145140
146- @Test ( . enabled( if: hasRegistryCredentials) )
147- func fetchBlob( ) async throws {
148- let client = RegistryClient ( host: " ghcr.io " , authentication: Self . authentication)
141+ @Test func fetchBlob( ) async throws {
142+ let client = RegistryClient ( host: " ghcr.io " )
149143 let descriptor = try await client. resolve ( name: " apple/containerization/dockermanifestimage " , tag: " 0.0.2 " )
150144 let manifest : Manifest = try await client. fetch ( name: " apple/containerization/dockermanifestimage " , descriptor: descriptor)
151145 var called = false
@@ -274,12 +268,10 @@ struct OCIClientTests: ~Copyable {
274268 )
275269 }
276270
277- @Test ( . enabled( if: hasRegistryCredentials) )
278- func resolveWithRetry( ) async throws {
271+ @Test func resolveWithRetry( ) async throws {
279272 let counter = Mutex ( 0 )
280273 let client = RegistryClient (
281274 host: " ghcr.io " ,
282- authentication: Self . authentication,
283275 retryOptions: RetryOptions (
284276 maxRetries: 3 ,
285277 retryInterval: 500_000_000 ,
0 commit comments