Skip to content

Commit 8e801e3

Browse files
committedApr 6, 2017
Update mount implementation, add mount integration tests, and check that path exists.
1 parent 12e41ae commit 8e801e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1596
-2604
lines changed
 

‎cmd/minikube/cmd/mount.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"k8s.io/minikube/pkg/minikube/cluster"
2727
"k8s.io/minikube/pkg/minikube/constants"
2828
"k8s.io/minikube/pkg/minikube/machine"
29-
"k8s.io/minikube/third_party/go9p/p/srv/examples/ufs"
29+
"k8s.io/minikube/third_party/go9p/ufs"
3030
)
3131

3232
// mountCmd represents the mount command
@@ -42,6 +42,15 @@ var mountCmd = &cobra.Command{
4242
fmt.Fprintln(os.Stderr, errText)
4343
os.Exit(1)
4444
}
45+
if _, err := os.Stat(args[0]); err != nil {
46+
if os.IsNotExist(err) {
47+
errText := fmt.Sprintf("Cannot find directory %s for mount", args[0])
48+
fmt.Fprintln(os.Stderr, errText)
49+
} else {
50+
errText := fmt.Sprintf("Error accesssing directory %s for mount", args[0])
51+
fmt.Fprintln(os.Stderr, errText)
52+
}
53+
}
4554
var debugVal int
4655
if glog.V(1) {
4756
debugVal = 1 // ufs.StartServer takes int debug param

‎hack/jenkins/common.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/minikube-${OS_ARCH} out/
3030
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/e2e-${OS_ARCH} out/
3131
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/busybox.yaml testdata/
3232
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/pvc.yaml testdata/
33+
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/busybox-mount-test.yaml testdata/
3334

3435
# Set the executable bit on the e2e binary and out binary
3536
chmod +x out/e2e-${OS_ARCH}
@@ -63,4 +64,4 @@ curl "https://api.github.com/repos/kubernetes/minikube/statuses/${COMMIT}?access
6364
-d "{\"state\": \"$status\", \"description\": \"Jenkins\", \"target_url\": \"$target_url\", \"context\": \"${JOB_NAME}\"}"
6465
set -x
6566

66-
exit $result
67+
exit $result

0 commit comments

Comments
 (0)
Please sign in to comment.