(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestProcessChangeRequest_TooRecentlyProcessed(t *testing.T) { |
| 25 | fn := "this_was_recently_processed.txt" |
| 26 | |
| 27 | s := devSession{ |
| 28 | ChangeRequest: &changeRequest{ |
| 29 | LastProcessedAt: time.Now(), |
| 30 | LastFileName: fn, |
| 31 | changeRequests: allocatedstack.New(1), |
| 32 | }, |
| 33 | SessionOpts: &SessionOpts{}, |
| 34 | } |
| 35 | |
| 36 | err := s.DoFileChangeRequest(fn, &ChangeRequestOpts{ |
| 37 | SafeFileTimeout: time.Second * 50, |
| 38 | }) |
| 39 | |
| 40 | if err == nil { |
| 41 | fmt.Println("err name", err) |
| 42 | t.Errorf("expected err file too recently processed") |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func TestDoChangeRequest_DirectFile(t *testing.T) { |
| 47 | fn := "direct_file_thing" |
nothing calls this directly
no test coverage detected