(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestSearchWithASuffixToAnotherValue(t *testing.T) { |
| 55 | config := cmn.GCO.BeginUpdate() |
| 56 | config.TestFSP.Count = 2 |
| 57 | cmn.GCO.CommitUpdate(config) |
| 58 | |
| 59 | TestNew(nil) |
| 60 | dirs := []string{"/tmp/x/z/abc", "/tmp/x/zabc", "/tmp/x/y/abc", "/tmp/x/yabc"} |
| 61 | createDirs(dirs...) |
| 62 | defer removeDirs(dirs...) |
| 63 | |
| 64 | oldMPs := setAvailableMountPaths(t, "/tmp/x/y", "/tmp/x/z") |
| 65 | |
| 66 | mpathInfo, err := Path2Mpath("z/abc") |
| 67 | tassert.Errorf(t, err != nil && mpathInfo == nil, "Expected a nil mountpath info for fqn %q (%v)", "z/abc", err) |
| 68 | |
| 69 | mpathInfo, err = Path2Mpath("/tmp/../tmp/x/z/abc") |
| 70 | tassert.Errorf(t, err == nil && mpathInfo.Path == "/tmp/x/z", "Actual: [%s]. Expected: [%s] (%v)", |
| 71 | mpathInfo, "/tmp/x/z", err) |
| 72 | |
| 73 | mpathInfo, err = Path2Mpath("/tmp/../tmp/x/y/abc") |
| 74 | tassert.Errorf(t, err == nil && mpathInfo.Path == "/tmp/x/y", "Actual: [%s]. Expected: [%s] (%v)", |
| 75 | mpathInfo, "/tmp/x/y", err) |
| 76 | setAvailableMountPaths(t, oldMPs...) |
| 77 | } |
| 78 | |
| 79 | func TestSimilarCases(t *testing.T) { |
| 80 | TestNew(nil) |
nothing calls this directly
no test coverage detected