From 59bc1f4ec95d0c58d3f318b28ab6e14264f236df Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Mon, 1 Jul 2024 15:53:39 +1000 Subject: [PATCH] Added another missed change --- Session.xcodeproj/project.pbxproj | 14 ++++++++++++++ .../_TestUtilities/SSKMockedExtensions.swift | 13 +++++++++++++ _SharedTestUtilities/CommonMockedExtensions.swift | 10 ---------- 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 SessionSnodeKitTests/_TestUtilities/SSKMockedExtensions.swift diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index da66a7fe2..45f35066f 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -530,6 +530,8 @@ FD1D732E2A86114600E3F410 /* _015_BlockCommunityMessageRequests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD1D732D2A86114600E3F410 /* _015_BlockCommunityMessageRequests.swift */; }; FD1F9C9F2A862BE60050F671 /* MigrationRequirement.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD1F9C9E2A862BE60050F671 /* MigrationRequirement.swift */; }; FD22724B2C326E75004D8A6C /* CustomArgSummaryDescribable+SMK.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD22724A2C326E75004D8A6C /* CustomArgSummaryDescribable+SMK.swift */; }; + FD22724E2C327BA5004D8A6C /* SSKMockedExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD22724D2C327BA5004D8A6C /* SSKMockedExtensions.swift */; }; + FD22724F2C327BCA004D8A6C /* SSKMockedExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD22724D2C327BA5004D8A6C /* SSKMockedExtensions.swift */; }; FD23CE1B2A651E6D0000B97C /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD23CE1A2A651E6D0000B97C /* Network.swift */; }; FD23CE1F2A65269C0000B97C /* Crypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD23CE1E2A65269C0000B97C /* Crypto.swift */; }; FD23CE222A661D000000B97C /* OpenGroupAPI+Crypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD23CE212A661D000000B97C /* OpenGroupAPI+Crypto.swift */; }; @@ -1748,6 +1750,7 @@ FD1D732D2A86114600E3F410 /* _015_BlockCommunityMessageRequests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = _015_BlockCommunityMessageRequests.swift; sourceTree = ""; }; FD1F9C9E2A862BE60050F671 /* MigrationRequirement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationRequirement.swift; sourceTree = ""; }; FD22724A2C326E75004D8A6C /* CustomArgSummaryDescribable+SMK.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CustomArgSummaryDescribable+SMK.swift"; sourceTree = ""; }; + FD22724D2C327BA5004D8A6C /* SSKMockedExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSKMockedExtensions.swift; sourceTree = ""; }; FD23CE1A2A651E6D0000B97C /* Network.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Network.swift; sourceTree = ""; }; FD23CE1E2A65269C0000B97C /* Crypto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Crypto.swift; sourceTree = ""; }; FD23CE212A661D000000B97C /* OpenGroupAPI+Crypto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OpenGroupAPI+Crypto.swift"; sourceTree = ""; }; @@ -3867,6 +3870,14 @@ path = Utilities; sourceTree = ""; }; + FD22724C2C327B97004D8A6C /* _TestUtilities */ = { + isa = PBXGroup; + children = ( + FD22724D2C327BA5004D8A6C /* SSKMockedExtensions.swift */, + ); + path = _TestUtilities; + sourceTree = ""; + }; FD23CE202A661CE80000B97C /* Crypto */ = { isa = PBXGroup; children = ( @@ -4114,6 +4125,7 @@ FD7C37AF2BBB8B1E009DEEA7 /* SessionSnodeKitTests */ = { isa = PBXGroup; children = ( + FD22724C2C327B97004D8A6C /* _TestUtilities */, FD7C37BC2BBB8BB1009DEEA7 /* Models */, ); path = SessionSnodeKitTests; @@ -6612,6 +6624,7 @@ FD7C37BF2BBB8BDF009DEEA7 /* Mock.swift in Sources */, FD7C37C22BBB8BED009DEEA7 /* MockCaches.swift in Sources */, FD7C37C62BBB8C08009DEEA7 /* TestConstants.swift in Sources */, + FD22724E2C327BA5004D8A6C /* SSKMockedExtensions.swift in Sources */, FD7C37C82BBB8C11009DEEA7 /* NimbleExtensions.swift in Sources */, FD7C37C52BBB8C01009DEEA7 /* MockJobRunner.swift in Sources */, FD7C37CB2BBB8D36009DEEA7 /* MockUserDefaults.swift in Sources */, @@ -6686,6 +6699,7 @@ FD23CE2E2A678E1E0000B97C /* MockCaches.swift in Sources */, FD23EA6228ED0B260058676E /* CombineExtensions.swift in Sources */, FD83B9C527CF3E2A005E1583 /* OpenGroupSpec.swift in Sources */, + FD22724F2C327BCA004D8A6C /* SSKMockedExtensions.swift in Sources */, FD23CE342A67C4D90000B97C /* MockNetwork.swift in Sources */, FDC2908B27D707F3005DAE71 /* SendMessageRequestSpec.swift in Sources */, FDC290A827D9B46D005DAE71 /* NimbleExtensions.swift in Sources */, diff --git a/SessionSnodeKitTests/_TestUtilities/SSKMockedExtensions.swift b/SessionSnodeKitTests/_TestUtilities/SSKMockedExtensions.swift new file mode 100644 index 000000000..87002f74f --- /dev/null +++ b/SessionSnodeKitTests/_TestUtilities/SSKMockedExtensions.swift @@ -0,0 +1,13 @@ +// Copyright © 2024 Rangeproof Pty Ltd. All rights reserved. + +import Foundation +import SessionUtilitiesKit + +extension Network.Destination: Mocked { + static var mockValue: Network.Destination = Network.Destination.server( + url: URL(string: "https://oxen.io")!, + method: .get, + headers: nil, + x25519PublicKey: "" + ) +} diff --git a/_SharedTestUtilities/CommonMockedExtensions.swift b/_SharedTestUtilities/CommonMockedExtensions.swift index 2d146d50c..37d1cf149 100644 --- a/_SharedTestUtilities/CommonMockedExtensions.swift +++ b/_SharedTestUtilities/CommonMockedExtensions.swift @@ -6,7 +6,6 @@ import GRDB import Sodium import Curve25519Kit import SessionUtilitiesKit -import SessionSnodeKit extension KeyPair: Mocked { static var mockValue: KeyPair = KeyPair( @@ -48,15 +47,6 @@ extension Network.RequestType: MockedGeneric { } } -extension Network.Destination: Mocked { - static var mockValue: Network.Destination = Network.Destination.server( - url: URL(string: "https://oxen.io")!, - method: .get, - headers: nil, - x25519PublicKey: "" - ) -} - extension AnyPublisher: MockedGeneric where Failure == Error { typealias Generic = Output