From bea76125867b7e95bded890e3c1c1d53ed40f760 Mon Sep 17 00:00:00 2001 From: AlexKuzyaev Date: Mon, 25 Sep 2023 16:28:50 +0200 Subject: [PATCH] Fix tests --- Sources/VariantsCore/Schemas/iOS/iOSVariant.swift | 2 ++ .../FastlaneParametersFactoryTests.swift | 8 ++++++-- Tests/VariantsCoreTests/VariantsFileFactoryTests.swift | 4 ++-- Tests/VariantsCoreTests/XcodeProjFactoryTests.swift | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Sources/VariantsCore/Schemas/iOS/iOSVariant.swift b/Sources/VariantsCore/Schemas/iOS/iOSVariant.swift index 8f09a4d..3cc3a57 100644 --- a/Sources/VariantsCore/Schemas/iOS/iOSVariant.swift +++ b/Sources/VariantsCore/Schemas/iOS/iOSVariant.swift @@ -8,6 +8,7 @@ import Foundation // swiftlint:disable type_name +// swiftlint:disable line_length public struct iOSVariant: Variant { let name: String @@ -225,3 +226,4 @@ extension iOSVariant { } // swiftlint:enable type_name +// swiftlint:enable line_length diff --git a/Tests/VariantsCoreTests/FastlaneParametersFactoryTests.swift b/Tests/VariantsCoreTests/FastlaneParametersFactoryTests.swift index cb67d93..e7a3908 100644 --- a/Tests/VariantsCoreTests/FastlaneParametersFactoryTests.swift +++ b/Tests/VariantsCoreTests/FastlaneParametersFactoryTests.swift @@ -9,6 +9,8 @@ import XCTest import PathKit @testable import VariantsCore +// swiftlint:disable function_body_length + private let parameters = [ CustomProperty(name: "sample", value: "sample-value", destination: .project), CustomProperty(name: "sample-2", value: "sample-2-value", destination: .fastlane), @@ -135,8 +137,8 @@ class FastlaneParametersFactoryTests: XCTestCase { bundleID: nil, variantSigning: nil, globalSigning: iOSSigning(teamName: "", teamID: "", exportMethod: .appstore, matchURL: ""), - variantPostSwitchScript: "echo hello", - globalPostSwitchScript: "echo test") + globalPostSwitchScript: "echo global", + variantPostSwitchScript: "echo variant") else { return XCTFail("Failed to initialize iOSVariant with provided parameters") } @@ -203,3 +205,5 @@ fileprivate extension Sequence where Iterator.Element == CustomProperty { .filter({ $0.destination == .fastlane && !$0.isEnvironmentVariable }) } } + +// swiftlint:enable function_body_length diff --git a/Tests/VariantsCoreTests/VariantsFileFactoryTests.swift b/Tests/VariantsCoreTests/VariantsFileFactoryTests.swift index 01bd66b..8c368a0 100644 --- a/Tests/VariantsCoreTests/VariantsFileFactoryTests.swift +++ b/Tests/VariantsCoreTests/VariantsFileFactoryTests.swift @@ -43,8 +43,8 @@ class VariantsFileFactoryTests: XCTestCase { bundleID: nil, variantSigning: nil, globalSigning: iOSSigning(teamName: "", teamID: "", exportMethod: .appstore, matchURL: ""), - variantPostSwitchScript: "echo hello", - globalPostSwitchScript: "echo test") + globalPostSwitchScript: "echo global", + variantPostSwitchScript: "echo variant") func testRender_noSecrets() { guard let configFile = Bundle(for: type(of: self)) diff --git a/Tests/VariantsCoreTests/XcodeProjFactoryTests.swift b/Tests/VariantsCoreTests/XcodeProjFactoryTests.swift index 09a3b04..123d60d 100644 --- a/Tests/VariantsCoreTests/XcodeProjFactoryTests.swift +++ b/Tests/VariantsCoreTests/XcodeProjFactoryTests.swift @@ -39,7 +39,7 @@ class XcodeProjFactoryTests: XCTestCase { guard let variant = try? iOSVariant(name: target.name, versionName: "", versionNumber: 0, appIcon: nil, appName: nil, storeDestination: nil, custom: nil, idSuffix: "", bundleID: nil, variantSigning: nil, globalSigning: iOSSigning(teamName: "", teamID: "", exportMethod: .appstore, matchURL: ""), - variantPostSwitchScript: nil, globalPostSwitchScript: nil) + globalPostSwitchScript: nil, variantPostSwitchScript: nil) else { return XCTFail("Failed to initialize iOSVariant with provided parameters") }