Skip to content

Commit

Permalink
Check idempotency of relation detaching in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EinKrebs committed Feb 7, 2024
1 parent d3037c6 commit 2e1266e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions qdb/memqdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ func TestDistributions(t *testing.T) {
assert.NotContains(oldDs.Relations, relation.Name)
}

func TestMemQDB_AlterDistributionDetach(t *testing.T) {
assert := assert.New(t)

memqdb, err := qdb.RestoreQDB(MemQDBPath)
assert.NoError(err)

ctx := context.TODO()

assert.NoError(memqdb.CreateDistribution(ctx, qdb.NewDistribution("ds1", nil)))

assert.NoError(memqdb.AlterDistributionDetach(ctx, "ds1", "not_exists"))
}

func TestKeyRanges(t *testing.T) {

assert := assert.New(t)
Expand Down

0 comments on commit 2e1266e

Please sign in to comment.