TestDistributorEmpty tries to read key material from an empty distributor and expects the call to timeout.
(t *testing.T)
| 30 | // TestDistributorEmpty tries to read key material from an empty distributor and |
| 31 | // expects the call to timeout. |
| 32 | func (s) TestDistributorEmpty(t *testing.T) { |
| 33 | dist := NewDistributor() |
| 34 | |
| 35 | // This call to KeyMaterial() should timeout because no key material has |
| 36 | // been set on the distributor as yet. |
| 37 | ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) |
| 38 | defer cancel() |
| 39 | if err := readAndVerifyKeyMaterial(ctx, dist, nil); !errors.Is(err, context.DeadlineExceeded) { |
| 40 | t.Fatal(err) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | // TestDistributor invokes the different methods on the Distributor type and |
| 45 | // verifies the results. |
nothing calls this directly
no test coverage detected