(label, remoteName, shareName, name, contents string, expectSuccess bool)
| 577 | } |
| 578 | |
| 579 | func (s *system) writeFile(label, remoteName, shareName, name, contents string, expectSuccess bool) { |
| 580 | path := pathTo(remoteName, shareName, name) |
| 581 | err := s.client.Write(path, []byte(contents), 0644) |
| 582 | if expectSuccess && err != nil { |
| 583 | s.t.Fatalf("%v: expected success writing file %q, but got error %v", label, path, err) |
| 584 | } else if !expectSuccess && err == nil { |
| 585 | s.t.Fatalf("%v: expected error writing file %q, but got no error", label, path) |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | func (s *system) renameFile(label, remoteName, fromShare, fromFile, toShare, toFile string, expectSuccess bool) { |
| 590 | fromPath := pathTo(remoteName, fromShare, fromFile) |
no test coverage detected