(t *testing.T)
| 435 | } |
| 436 | |
| 437 | func TestClient_Cleanup(t *testing.T) { |
| 438 | c, err := light.NewClient( |
| 439 | ctx, |
| 440 | chainID, |
| 441 | trustOptions, |
| 442 | fullNode, |
| 443 | []provider.Provider{fullNode}, |
| 444 | dbs.New(dbm.NewMemDB(), chainID), |
| 445 | light.Logger(log.TestingLogger()), |
| 446 | ) |
| 447 | require.NoError(t, err) |
| 448 | _, err = c.TrustedLightBlock(1) |
| 449 | require.NoError(t, err) |
| 450 | |
| 451 | err = c.Cleanup() |
| 452 | require.NoError(t, err) |
| 453 | |
| 454 | // Check no light blocks exist after Cleanup. |
| 455 | l, err := c.TrustedLightBlock(1) |
| 456 | assert.Error(t, err) |
| 457 | assert.Nil(t, l) |
| 458 | } |
| 459 | |
| 460 | // trustedHeader.Height == options.Height |
| 461 | func TestClientRestoresTrustedHeaderAfterStartup1(t *testing.T) { |
nothing calls this directly
no test coverage detected