Skip to content

Commit bfad186

Browse files
authored
hide testing harness in release builds (#63)
motivation: testing harness should only be used for testing, and uses @testable import which doe not work in release builds changes: hide code behind #if check
1 parent 920302a commit bfad186

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/AWSLambdaTesting/Lambda+Testing.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
// @testable for access of internal functions - this would only work for testing by design
15+
// this is designed to only work for testing
16+
// #if filter required for release builds which do not support @testable import
17+
// @testable is used to access of internal functions
18+
#if DEBUG
1619
@testable import AWSLambdaRuntime
1720
import Dispatch
1821
import Logging
@@ -87,3 +90,4 @@ extension Lambda {
8790
}.wait()
8891
}
8992
}
93+
#endif

0 commit comments

Comments
 (0)