We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebc2b30 commit 9867dbaCopy full SHA for 9867dba
1 file changed
Tests/SQLClientSwiftTests/SQLClientSwiftTests.swift
@@ -28,14 +28,18 @@ final class SQLClientSwiftTests: XCTestCase {
28
/// Centralises boilerplate setup making
29
override func setUp() async throws {
30
try super.setUpWithError()
31
-
+ guard canConnect else {
32
+ throw XCTSkip("Set HOST, USERNAME, PASSWORD environment variables to run tests.")
33
+ }
34
client = try await makeClient()
35
+
36
}
37
38
/// Called after each XCTest method is run. Able to throw errors on cleanup.
39
/// Ensures cleanup from each test is completed after the test is run. Before
40
/// the next test is run.
41
override func tearDown() async throws {
42
+ guard client != nil else { return }
43
try await client.disconnect()
44
try await super.tearDown()
45
0 commit comments