- // Create two test Keep volumes and store a block in each of them.
- KeepVolumes = setup(t, 2)
-
- for _, vol := range KeepVolumes {
- store(t, vol, TEST_HASH, TEST_BLOCK)
- }
-
- // Check that GetBlock returns success.
- result, err := GetBlock(TEST_HASH)
- if err != nil {
- t.Errorf("GetBlock error: %s", err)
- }
- if fmt.Sprint(result) != fmt.Sprint(TEST_BLOCK) {
- t.Errorf("expected %s, got %s", TEST_BLOCK, result)
- }
-}
-
-// TestGetBlockOneKeepOK
-// Test that block reads succeed even when the block is found only
-// on one Keep volume.
-//
-func TestGetBlockOneKeepOK(t *testing.T) {
- defer teardown()
-
- // Two test Keep volumes, only the second has a block.