(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestShellQuote(t *testing.T) { |
| 66 | tests := []struct { |
| 67 | value string |
| 68 | want string |
| 69 | }{ |
| 70 | {value: "/srv/cache", want: "'/srv/cache'"}, |
| 71 | {value: "/srv/celer cache", want: "'/srv/celer cache'"}, |
| 72 | {value: "/srv/celer's cache", want: "'/srv/celer'\\''s cache'"}, |
| 73 | } |
| 74 | |
| 75 | for _, tt := range tests { |
| 76 | t.Run(tt.value, func(t *testing.T) { |
| 77 | if got := shellQuote(tt.value); got != tt.want { |
| 78 | t.Fatalf("shellQuote(%q) = %q, want %q", tt.value, got, tt.want) |
| 79 | } |
| 80 | }) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func TestNFSServerSetupRemoveNFSExportEntry(t *testing.T) { |
| 85 | exportsPath := filepath.Join(t.TempDir(), "exports") |
nothing calls this directly
no test coverage detected