MCPcopy Create free account
hub / github.com/tailscale/tailscale / checkFileInfosEqual

Method checkFileInfosEqual

drive/driveimpl/drive_test.go:709–717  ·  view source on GitHub ↗
(expected, actual fs.FileInfo, label string)

Source from the content-addressed store, hash-verified

707}
708
709func (s *system) checkFileInfosEqual(expected, actual fs.FileInfo, label string) {
710 if expected == nil && actual == nil {
711 return
712 }
713 diff := cmp.Diff(fileInfoToStatic(expected, true), fileInfoToStatic(actual, false))
714 if diff != "" {
715 s.t.Errorf("%v (-got, +want):\n%s", label, diff)
716 }
717}
718
719func fileInfoToStatic(fi fs.FileInfo, fixupMode bool) fs.FileInfo {
720 mode := fi.Mode()

Callers 1

checkFileStatusMethod · 0.95

Calls 3

fileInfoToStaticFunction · 0.85
DiffMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected