MCPcopy Create free account
hub / github.com/GuyARoss/orbit / TestProcessChangeRequest_TooRecentlyProcessed

Function TestProcessChangeRequest_TooRecentlyProcessed

internal/dev_test.go:24–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22)
23
24func 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
46func TestDoChangeRequest_DirectFile(t *testing.T) {
47 fn := "direct_file_thing"

Callers

nothing calls this directly

Calls 1

DoFileChangeRequestMethod · 0.95

Tested by

no test coverage detected