use of org.projectnessie.versioned.testworker.OnRefOnly in project nessie by projectnessie.
the class AbstractCommits method commitDuplicateValues.
/*
* Test:
* - Check that store allows storing the same value under different keys
*/
@Test
public void commitDuplicateValues() throws Exception {
BranchName branch = BranchName.of("dupe-values");
store().create(branch, Optional.empty());
OnRefOnly foo1 = newOnRef("foo");
OnRefOnly foo2 = newOnRef("foo");
store().commit(branch, Optional.empty(), commitMessage("metadata"), ImmutableList.of(put("keyA", foo1), put("keyB", foo2)));
assertThat(store().getValue(branch, Key.of("keyA"))).isEqualTo(foo1);
assertThat(store().getValue(branch, Key.of("keyB"))).isEqualTo(foo2);
}
Aggregations