Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
snazy committed May 6, 2023
1 parent 7a0cbb7 commit cbdcedb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.concurrent.Callable;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Stream;
import javax.annotation.Nonnull;
import org.projectnessie.model.CommitMeta;
Expand Down Expand Up @@ -192,9 +193,10 @@ public PaginationIterator<Commit> getCommits(Ref ref, boolean fetchAdditionalInf
}

@Override
public PaginationIterator<KeyEntry> getKeys(Ref ref, String pagingToken, boolean withContent)
public PaginationIterator<KeyEntry> getKeys(
Ref ref, String pagingToken, boolean withContent, ContentKey minKey, ContentKey maxKey)
throws ReferenceNotFoundException {
return delegate.getKeys(ref, pagingToken, withContent);
return delegate.getKeys(ref, pagingToken, withContent, minKey, maxKey);
}

@Override
Expand All @@ -209,9 +211,15 @@ public Map<ContentKey, Content> getValues(Ref ref, Collection<ContentKey> keys)
}

@Override
public PaginationIterator<Diff> getDiffs(Ref from, Ref to, String pagingToken)
public PaginationIterator<Diff> getDiffs(
Ref from,
Ref to,
String pagingToken,
ContentKey minKey,
ContentKey maxKey,
Predicate<ContentKey> contentKeyPredicate)
throws ReferenceNotFoundException {
return delegate.getDiffs(from, to, pagingToken);
return delegate.getDiffs(from, to, pagingToken, minKey, maxKey, contentKeyPredicate);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,10 @@ void testGetCommits() throws Exception {

@Test
void testGetKeys() throws Exception {
when(delegate.getKeys(branch1, "token1", false)).thenReturn(iteratorKeyEntries);
when(delegate.getKeys(branch1, "token1", false, null, null)).thenReturn(iteratorKeyEntries);
EventsVersionStore versionStore = new EventsVersionStore(delegate, sink);
PaginationIterator<KeyEntry> result = versionStore.getKeys(branch1, "token1", false);
PaginationIterator<KeyEntry> result =
versionStore.getKeys(branch1, "token1", false, null, null);
assertThat(result).isSameAs(iteratorKeyEntries);
verifyNoMoreInteractions(delegate);
verifyNoInteractions(sink);
Expand Down Expand Up @@ -617,9 +618,10 @@ void testGetValues() throws Exception {

@Test
void testGetDiffs() throws Exception {
when(delegate.getDiffs(hash1, hash2, "token1")).thenReturn(iteratorDiffs);
when(delegate.getDiffs(hash1, hash2, "token1", null, null, null)).thenReturn(iteratorDiffs);
EventsVersionStore versionStore = new EventsVersionStore(delegate, sink);
PaginationIterator<Diff> result = versionStore.getDiffs(hash1, hash2, "token1");
PaginationIterator<Diff> result =
versionStore.getDiffs(hash1, hash2, "token1", null, null, null);
assertThat(result).isSameAs(iteratorDiffs);
verifyNoMoreInteractions(delegate);
verifyNoInteractions(sink);
Expand Down

0 comments on commit cbdcedb

Please sign in to comment.