(t *testing.T)
| 632 | } |
| 633 | |
| 634 | func TestStaticSocket(t *testing.T) { |
| 635 | tdir := t.TempDir() |
| 636 | |
| 637 | sockPath := filepath.Join(tdir, "socket") |
| 638 | err := osutil.Mksocket(sockPath) |
| 639 | if err == osutil.ErrNotSupported { |
| 640 | t.SkipNow() |
| 641 | } |
| 642 | if err != nil { |
| 643 | t.Fatalf("osutil.Mksocket(): %v", err) |
| 644 | } |
| 645 | |
| 646 | fi, err := os.Lstat(sockPath) |
| 647 | if err != nil { |
| 648 | t.Fatalf("os.Lstat(): %v", err) |
| 649 | } |
| 650 | |
| 651 | bb := NewCommonFileMap(sockPath, fi) |
| 652 | bb.SetType(TypeSocket) |
| 653 | bb.SetFileName(sockPath) |
| 654 | blob := bb.Blob() |
| 655 | t.Logf("Got JSON for socket: %s\n", blob.JSON()) |
| 656 | |
| 657 | sf, ok := blob.AsStaticFile() |
| 658 | if !ok { |
| 659 | t.Fatalf("Blob.AsStaticFile(): Expected true, got false") |
| 660 | } |
| 661 | _, ok = sf.AsStaticSocket() |
| 662 | if !ok { |
| 663 | t.Fatalf("StaticFile.AsStaticSocket(): Expected true, got false") |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | func TestTimezoneEXIFCorrection(t *testing.T) { |
| 668 | // Test that we get UTC times for photos taken in two |
nothing calls this directly
no test coverage detected