@@ -84,6 +84,9 @@ final class UpdateTests: SwiftlyTests {
8484
8585 /// Verify that a toolchain can be updated to the latest patch version of that toolchain's minor version.
8686 func testUpdateToLatestPatch( ) async throws {
87+ let snapshotsAvailable = try await self . snapshotsAvailable ( )
88+ try XCTSkipIf ( !snapshotsAvailable)
89+
8790 try await self . withTestHome {
8891 try await self . withMockedToolchain {
8992 try await self . installMockedToolchain ( selector: " 5.9.0 " )
@@ -111,16 +114,16 @@ final class UpdateTests: SwiftlyTests {
111114 func testUpdateInUse( ) async throws {
112115 try await self . withTestHome {
113116 try await self . withMockedToolchain {
114- try await self . installMockedToolchain ( selector: " 5.9 .0" )
117+ try await self . installMockedToolchain ( selector: " 6.0 .0" )
115118
116119 var update = try self . parseCommand ( Update . self, [ " update " , " -y " , " --no-verify " , " --post-install-file= \( Swiftly . currentPlatform. getTempFilePath ( ) . path) " ] )
117120 try await update. run ( )
118121
119122 let config = try Config . load ( )
120123 let inUse = config. inUse!. asStableRelease!
121- XCTAssertGreaterThan ( inUse, . init( major: 5 , minor: 9 , patch: 0 ) )
122- XCTAssertEqual ( inUse. major, 5 )
123- XCTAssertEqual ( inUse. minor, 9 )
124+ XCTAssertGreaterThan ( inUse, . init( major: 6 , minor: 0 , patch: 0 ) )
125+ XCTAssertEqual ( inUse. major, 6 )
126+ XCTAssertEqual ( inUse. minor, 0 )
124127 XCTAssertGreaterThan ( inUse. patch, 0 )
125128
126129 try await self . validateInstalledToolchains (
@@ -135,6 +138,9 @@ final class UpdateTests: SwiftlyTests {
135138
136139 /// Verifies that snapshots, both from the main branch and from development branches, can be updated.
137140 func testUpdateSnapshot( ) async throws {
141+ let snapshotsAvailable = try await self . snapshotsAvailable ( )
142+ try XCTSkipIf ( !snapshotsAvailable)
143+
138144 let branches : [ ToolchainVersion . Snapshot . Branch ] = [
139145 . main,
140146 . release( major: 6 , minor: 0 ) ,
@@ -170,20 +176,20 @@ final class UpdateTests: SwiftlyTests {
170176 func testUpdateSelectsLatestMatchingStableRelease( ) async throws {
171177 try await self . withTestHome {
172178 try await self . withMockedToolchain {
173- try await self . installMockedToolchain ( selector: " 5.9 .1" )
174- try await self . installMockedToolchain ( selector: " 5.9 .0" )
179+ try await self . installMockedToolchain ( selector: " 6.0 .1" )
180+ try await self . installMockedToolchain ( selector: " 6.0 .0" )
175181
176- var update = try self . parseCommand ( Update . self, [ " update " , " -y " , " 5.9 " , " --no-verify " , " --post-install-file= \( Swiftly . currentPlatform. getTempFilePath ( ) . path) " ] )
182+ var update = try self . parseCommand ( Update . self, [ " update " , " -y " , " 6.0 " , " --no-verify " , " --post-install-file= \( Swiftly . currentPlatform. getTempFilePath ( ) . path) " ] )
177183 try await update. run ( )
178184
179185 let config = try Config . load ( )
180186 let inUse = config. inUse!. asStableRelease!
181- XCTAssertEqual ( inUse. major, 5 )
182- XCTAssertEqual ( inUse. minor, 9 )
187+ XCTAssertEqual ( inUse. major, 6 )
188+ XCTAssertEqual ( inUse. minor, 0 )
183189 XCTAssertGreaterThan ( inUse. patch, 1 )
184190
185191 try await self . validateInstalledToolchains (
186- [ config. inUse!, . init( major: 5 , minor: 9 , patch: 0 ) ] ,
192+ [ config. inUse!, . init( major: 6 , minor: 0 , patch: 0 ) ] ,
187193 description: " update with ambiguous selector should update the latest matching toolchain "
188194 )
189195 }
@@ -192,6 +198,9 @@ final class UpdateTests: SwiftlyTests {
192198
193199 /// Verify that the latest of all the matching snapshot toolchains is updated.
194200 func testUpdateSelectsLatestMatchingSnapshotRelease( ) async throws {
201+ let snapshotsAvailable = try await self . snapshotsAvailable ( )
202+ try XCTSkipIf ( !snapshotsAvailable)
203+
195204 let branches : [ ToolchainVersion . Snapshot . Branch ] = [
196205 . main,
197206 . release( major: 6 , minor: 0 ) ,
0 commit comments