(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestLogManager_NotEnabled(t *testing.T) { |
| 73 | d := blobtesting.DataMap{} |
| 74 | st := blobtesting.NewMapStorage(d, nil, nil) |
| 75 | w := repodiag.NewWriter(st, newStaticCrypter(t)) |
| 76 | ctx := testlogging.Context(t) |
| 77 | lm := repodiag.NewLogManager(ctx, w, false, io.Discard) |
| 78 | |
| 79 | l := lm.NewLogger("test") |
| 80 | contentlog.Log(ctx, l, "hello") |
| 81 | |
| 82 | require.Empty(t, d) |
| 83 | lm.Sync() |
| 84 | w.Wait(ctx) |
| 85 | |
| 86 | // make sure log messages are not written |
| 87 | require.Empty(t, d) |
| 88 | } |
| 89 | |
| 90 | func TestLogManager_CancelledContext(t *testing.T) { |
| 91 | d := blobtesting.DataMap{} |
nothing calls this directly
no test coverage detected