Test that no error occurs when storage doesn't support lease renewal
(t *testing.T)
| 135 | |
| 136 | // Test that no error occurs when storage doesn't support lease renewal |
| 137 | func TestRenewLockLeaseWithoutInterface(t *testing.T) { |
| 138 | ctx := context.Background() |
| 139 | tmpDir, err := os.MkdirTemp(os.TempDir(), "certmagic-test*") |
| 140 | testutil.RequireNoError(t, err, "allocating tmp dir") |
| 141 | defer os.RemoveAll(tmpDir) |
| 142 | |
| 143 | storage := &FileStorage{Path: tmpDir} |
| 144 | |
| 145 | cfg := &Config{Logger: defaultTestLogger} |
| 146 | err = cfg.renewLockLease(ctx, storage, "test-lock", 0) |
| 147 | testutil.RequireNoError(t, err) |
| 148 | } |
| 149 | |
| 150 | func mustJSON(val any) []byte { |
| 151 | result, err := json.Marshal(val) |
nothing calls this directly
no test coverage detected
searching dependent graphs…