Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Commit

Permalink
Also filter ip response to expected rows
Browse files Browse the repository at this point in the history
  • Loading branch information
ash211 committed Feb 13, 2017
1 parent 6e878c4 commit c40953a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.apache.spark.deploy.kubernetes.integrationtest.minikube
import java.io.{BufferedReader, InputStreamReader}
import java.nio.file.Paths
import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
import javax.net.ssl.X509TrustManager

import io.fabric8.kubernetes.client.{ConfigBuilder, DefaultKubernetesClient}
Expand Down Expand Up @@ -58,6 +59,7 @@ private[spark] object Minikube extends Logging {
def getMinikubeIp: String = synchronized {
assert(MINIKUBE_EXECUTABLE_DEST.exists(), EXPECTED_DOWNLOADED_MINIKUBE_MESSAGE)
val outputs = executeMinikube("ip")
.filter(_.matches("^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"))
assert(outputs.size == 1, "Unexpected amount of output from minikube ip")
outputs.head
}
Expand Down

0 comments on commit c40953a

Please sign in to comment.