Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions fragment_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ func TestFragmentInfo(t *testing.T) {
context, err := NewContext(config)
require.NoError(t, err)

fragmentSize := testFragmentInfo(t, context)
assert.Equal(t, uint64(4290), fragmentSize)
testFragmentInfo(t, context)
}

func TestFragmentInfoEncryption(t *testing.T) {
Expand All @@ -36,11 +35,10 @@ func TestFragmentInfoEncryption(t *testing.T) {
context, err := NewContext(config)
require.NoError(t, err)

fragmentSize := testFragmentInfo(t, context)
assert.Equal(t, uint64(7601), fragmentSize)
testFragmentInfo(t, context)
}

func testFragmentInfo(t testing.TB, context *Context) uint64 {
func testFragmentInfo(t testing.TB, context *Context) {
// create temp group name
tmpArrayPath := t.TempDir()

Expand Down Expand Up @@ -91,6 +89,7 @@ func testFragmentInfo(t testing.TB, context *Context) uint64 {

fragmentSize, err := fI.GetFragmentSize(0)
require.NoError(t, err)
require.Greater(t, fragmentSize, uint64(0))

isDense, err := fI.GetDense(0)
require.NoError(t, err)
Expand Down Expand Up @@ -142,8 +141,6 @@ func testFragmentInfo(t testing.TB, context *Context) uint64 {
assert.Contains(t, fragmentInfoStr, fI.uri)

fI.Free()

return fragmentSize
}

func writeToArray(t testing.TB, context *Context, tmpArrayPath string) {
Expand Down