-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66cce50
commit 5f4ba3f
Showing
1 changed file
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,37 +10,41 @@ import XCTest | |
|
||
|
||
class IntegrationTests: XCTestCase { | ||
|
||
|
||
#if swift(>=5.2) | ||
func test_ArenaTest() throws { | ||
try XCTSkipUnless(ProcessInfo().hostName == "luna.local", "fails on CI, only run locally") | ||
|
||
let output = OutputListener() | ||
output.openConsolePipe() | ||
|
||
let arena = try Arena.parse([ | ||
"https://github.com/finestructure/[email protected]", | ||
"--name=ArenaIntegrationTest", | ||
"--force", | ||
"--skip-open"]) | ||
try arena.run() | ||
|
||
let expectation = """ | ||
🔧 resolving package dependencies | ||
📔 libraries found: ArenaTest | ||
🔨 building package dependencies | ||
✅ created project in folder '../../tmp/ArenaIntegrationTest' | ||
Run | ||
open ../../tmp/ArenaIntegrationTest/ArenaIntegrationTest.xcworkspace | ||
to open the project in Xcode | ||
""" | ||
🔧 resolving package dependencies | ||
📔 libraries found: ArenaTest | ||
🔨 building package dependencies | ||
✅ created project in folder '../../tmp/ArenaIntegrationTest' | ||
Run | ||
open ../../tmp/ArenaIntegrationTest/ArenaIntegrationTest.xcworkspace | ||
to open the project in Xcode | ||
""" | ||
let predicate = NSPredicate { _,_ in | ||
output.contents == expectation | ||
} | ||
let exp = XCTNSPredicateExpectation(predicate: predicate, object: nil) | ||
wait(for: [exp], timeout: 10) | ||
XCTAssertEqual(output.contents, expectation) | ||
|
||
output.closeConsolePipe() | ||
} | ||
|
||
#endif | ||
|
||
} | ||
|