...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package fuse_test
19
20 import (
21 "os"
22 "testing"
23
24 "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/fuse"
25 )
26
27 func TestFUSESupport(t *testing.T) {
28 if testing.Short() {
29 t.Skip("skipping fuse tests in short mode.")
30 }
31
32 removePath := func() func() {
33 original := os.Getenv("PATH")
34 os.Unsetenv("PATH")
35 return func() { os.Setenv("PATH", original) }
36 }
37 if !fuse.Supported() {
38 t.Fatal("expected FUSE to be supported")
39 }
40 cleanup := removePath()
41 defer cleanup()
42
43 if !fuse.Supported() {
44 t.Fatal("expected FUSE to be supported")
45 }
46
47 }
48
View as plain text