From 91312d8dc630e0b11769a06c0fa4274f1d5e1f92 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Tue, 14 Jan 2025 16:56:49 +1100 Subject: [PATCH] fix: set pipefail during make test --- Coder Desktop/Coder DesktopTests/Util.swift | 7 +++++++ Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Coder Desktop/Coder DesktopTests/Util.swift b/Coder Desktop/Coder DesktopTests/Util.swift index c44c860..bb0ff99 100644 --- a/Coder Desktop/Coder DesktopTests/Util.swift +++ b/Coder Desktop/Coder DesktopTests/Util.swift @@ -1,5 +1,6 @@ @testable import Coder_Desktop import Combine +import NetworkExtension import SwiftUI import ViewInspector @@ -20,6 +21,8 @@ class MockVPNService: VPNService, ObservableObject { state = .disconnecting await onStop?() } + + func configureTunnelProviderProtocol(proto _: NETunnelProviderProtocol?) {} } class MockSession: Session { @@ -41,6 +44,10 @@ class MockSession: Session { sessionToken = nil baseAccessURL = nil } + + func tunnelProviderProtocol() -> NETunnelProviderProtocol? { + return nil + } } struct MockClient: Client { diff --git a/Makefile b/Makefile index 5f56b6e..b746639 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ fmt: $(FMTFLAGS) . test: - xcodebuild test \ + set -o pipefail && xcodebuild test \ -project $(PROJECT) \ -scheme $(SCHEME) \ -testPlan $(SCHEME) \