Skip to content

Commit

Permalink
cleanup docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed May 14, 2018
1 parent cf3794e commit f446e14
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Tests/PostgreSQLTests/PostgreSQLConnectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ extension PostgreSQLConnection {
/// Creates a test event loop and psql client over ssl.
static func makeTest(transport: PostgreSQLTransportConfig) throws -> PostgreSQLConnection {
#if os(macOS)
return try _makeTest(hostname: self.dockerMachineHostname, password: "vapor_password", port: transport.isTLS ? 5433 : 5432, transport: transport)
return try _makeTest(hostname: "192.168.99.100", password: "vapor_password", port: transport.isTLS ? 5433 : 5432, transport: transport)
#else
return try _makeTest(hostname: transport.isTLS ? "tls" : "cleartext", password: "vapor_password", transport: transport)
#endif
Expand All @@ -504,10 +504,6 @@ extension PostgreSQLConnection {
_ = try client.authenticate(username: "vapor_username", database: "vapor_database", password: password).wait()
return client
}

private static var dockerMachineHostname: String {
return (try? Process.execute("docker-machine", "ip")) ?? "192.168.99.100"
}
}

func +=<T>(lhs: inout [T], rhs: T) {
Expand Down

0 comments on commit f446e14

Please sign in to comment.