This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +65
-31
lines changed Expand file tree Collapse file tree 9 files changed +65
-31
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import class Foundation.Bundle
22import XCTest
33
44final class HTTPSRequestTests : XCTestCase {
5- func testExample ( ) throws {
5+ func testMissingLambdaRuntimeApi ( ) throws {
66 // This is an example of a functional test case.
77 // Use XCTAssert and related functions to verify your tests produce the correct
88 // results.
@@ -26,7 +26,9 @@ final class HTTPSRequestTests: XCTestCase {
2626 let data = pipe. fileHandleForReading. readDataToEndOfFile ( )
2727 let output = String ( data: data, encoding: . utf8)
2828
29- XCTAssertEqual ( output, " Hello, world! \n " )
29+ let isError = output? . contains ( " missingEnvironmentVariables(LambdaSwiftSprinter.Context.AWSEnvironmentKey.lambdaRuntimeApi) " )
30+
31+ XCTAssertEqual ( isError, true )
3032 }
3133
3234 /// Returns path to the built products directory.
@@ -42,6 +44,6 @@ final class HTTPSRequestTests: XCTestCase {
4244 }
4345
4446 static var allTests = [
45- ( " testExample " , testExample ) ,
47+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi ) ,
4648 ]
4749}
Original file line number Diff line number Diff line change 1+ #if !canImport(ObjectiveC)
12import XCTest
23
3- #if !canImport(ObjectiveC)
4- public func allTests( ) -> [ XCTestCaseEntry ] {
5- return [
6- testCase ( HTTPSRequestTests . allTests) ,
7- ]
8- }
4+ extension HTTPSRequestTests {
5+ // DO NOT MODIFY: This is autogenerated, use:
6+ // `swift test --generate-linuxmain`
7+ // to regenerate.
8+ static let __allTests__HTTPSRequestTests = [
9+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi) ,
10+ ]
11+ }
12+
13+ public func __allTests( ) -> [ XCTestCaseEntry ] {
14+ return [
15+ testCase ( HTTPSRequestTests . __allTests__HTTPSRequestTests) ,
16+ ]
17+ }
918#endif
Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ import XCTest
33import HTTPSRequestTests
44
55var tests = [ XCTestCaseEntry] ( )
6- tests += HTTPSRequestTests . allTests ( )
6+ tests += HTTPSRequestTests . __allTests ( )
7+
78XCTMain ( tests)
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import class Foundation.Bundle
22import XCTest
33
44final class HelloWorldTests : XCTestCase {
5- func testExample ( ) throws {
5+ func testMissingLambdaRuntimeApi ( ) throws {
66 // This is an example of a functional test case.
77 // Use XCTAssert and related functions to verify your tests produce the correct
88 // results.
@@ -18,15 +18,15 @@ final class HelloWorldTests: XCTestCase {
1818 process. executableURL = fooBinary
1919
2020 let pipe = Pipe ( )
21- process. standardOutput = pipe
21+ process. standardError = pipe
2222
2323 try process. run ( )
2424 process. waitUntilExit ( )
2525
2626 let data = pipe. fileHandleForReading. readDataToEndOfFile ( )
2727 let output = String ( data: data, encoding: . utf8)
2828
29- XCTAssertEqual ( output, " Hello, world! \n " )
29+ XCTAssertEqual ( output, " missingEnvironmentVariables(LambdaSwiftSprinter.Context.AWSEnvironmentKey.lambdaRuntimeApi) \n " )
3030 }
3131
3232 /// Returns path to the built products directory.
@@ -42,6 +42,6 @@ final class HelloWorldTests: XCTestCase {
4242 }
4343
4444 static var allTests = [
45- ( " testExample " , testExample ) ,
45+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi ) ,
4646 ]
4747}
Original file line number Diff line number Diff line change 1+ #if !canImport(ObjectiveC)
12import XCTest
23
3- #if !canImport(ObjectiveC)
4- public func allTests( ) -> [ XCTestCaseEntry ] {
5- return [
6- testCase ( HelloWorldTests . allTests) ,
7- ]
8- }
4+ extension HelloWorldTests {
5+ // DO NOT MODIFY: This is autogenerated, use:
6+ // `swift test --generate-linuxmain`
7+ // to regenerate.
8+ static let __allTests__HelloWorldTests = [
9+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi) ,
10+ ]
11+ }
12+
13+ public func __allTests( ) -> [ XCTestCaseEntry ] {
14+ return [
15+ testCase ( HelloWorldTests . __allTests__HelloWorldTests) ,
16+ ]
17+ }
918#endif
Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ import XCTest
33import HelloWorldTests
44
55var tests = [ XCTestCaseEntry] ( )
6- tests += HelloWorldTests . allTests ( )
6+ tests += HelloWorldTests . __allTests ( )
7+
78XCTMain ( tests)
Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ import XCTest
33import S3TestTests
44
55var tests = [ XCTestCaseEntry] ( )
6- tests += S3TestTests . allTests ( )
6+ tests += S3TestTests . __allTests ( )
7+
78XCTMain ( tests)
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import class Foundation.Bundle
22import XCTest
33
44final class S3TestTests : XCTestCase {
5- func testExample ( ) throws {
5+ func testMissingLambdaRuntimeApi ( ) throws {
66 // This is an example of a functional test case.
77 // Use XCTAssert and related functions to verify your tests produce the correct
88 // results.
@@ -25,8 +25,10 @@ final class S3TestTests: XCTestCase {
2525
2626 let data = pipe. fileHandleForReading. readDataToEndOfFile ( )
2727 let output = String ( data: data, encoding: . utf8)
28+
29+ let isError = output? . contains ( " missingEnvironmentVariables(LambdaSwiftSprinter.Context.AWSEnvironmentKey.lambdaRuntimeApi) " )
2830
29- XCTAssertEqual ( output , " " )
31+ XCTAssertEqual ( isError , true )
3032 }
3133
3234 /// Returns path to the built products directory.
@@ -42,6 +44,6 @@ final class S3TestTests: XCTestCase {
4244 }
4345
4446 static var allTests = [
45- ( " testExample " , testExample ) ,
47+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi ) ,
4648 ]
4749}
Original file line number Diff line number Diff line change 1+ #if !canImport(ObjectiveC)
12import XCTest
23
3- #if !canImport(ObjectiveC)
4- public func allTests( ) -> [ XCTestCaseEntry ] {
5- return [
6- testCase ( S3TestTests . allTests) ,
7- ]
8- }
4+ extension S3TestTests {
5+ // DO NOT MODIFY: This is autogenerated, use:
6+ // `swift test --generate-linuxmain`
7+ // to regenerate.
8+ static let __allTests__S3TestTests = [
9+ ( " testMissingLambdaRuntimeApi " , testMissingLambdaRuntimeApi) ,
10+ ]
11+ }
12+
13+ public func __allTests( ) -> [ XCTestCaseEntry ] {
14+ return [
15+ testCase ( S3TestTests . __allTests__S3TestTests) ,
16+ ]
17+ }
918#endif
You can’t perform that action at this time.
0 commit comments