(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestValidFilePaths(t *testing.T) { |
| 39 | paths := map[string]bool{ |
| 40 | "tls/_/../../something": false, |
| 41 | "tls/../../something": false, |
| 42 | "../../something": false, |
| 43 | "/tls/absolute/unix/path": false, |
| 44 | `C:\tls\absolute\windows\path`: false, |
| 45 | "C:/tls/absolute/windows/path": false, |
| 46 | } |
| 47 | for p, expectedValid := range paths { |
| 48 | err := isValidFilePath(p) |
| 49 | assert.Equal(t, err == nil, expectedValid, "%q should report valid as: %v", p, expectedValid) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func TestValidateContextName(t *testing.T) { |
| 54 | names := map[string]bool{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…