Skip to content

Commit

Permalink
Doesn't work in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Mar 2, 2020
1 parent 66cce50 commit 5f4ba3f
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions Tests/ArenaTests/IntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

0 comments on commit 5f4ba3f

Please sign in to comment.