Skip to content

Commit

Permalink
Ensure load is only executed on a empty db
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Jun 20, 2022
1 parent f8cdbce commit 3e7556d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prefix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,8 @@ func Test_ipamer_DumpAndLoad(t *testing.T) {
require.Error(t, err)
require.Equal(t, "prefixes exist, please drop existing data before loading", err.Error())

ipam.storage.DeleteAllPrefixes()
err = ipam.storage.DeleteAllPrefixes()
require.NoError(t, err)
err = ipam.Load(data)
require.NoError(t, err)

Expand Down

0 comments on commit 3e7556d

Please sign in to comment.