Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Aug 3, 2023
1 parent b57e8e4 commit f4195a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void testWriteOverrideAppendBlob() throws Exception {
final Map<String, String> metadata = new AzureMetadataFeature(session, context).getMetadata(test);
assertEquals("text/plain", metadata.get("Content-Type"));
assertEquals("public,max-age=86400", metadata.get("Cache-Control"));
assertEquals(content.length, new AzureWriteFeature(session, context).append(test, status.withRemote(attributes)).size, 0L);
assertEquals(content.length, new AzureWriteFeature(session, context).append(test, status.exists(true).withRemote(attributes)).size, 0L);
final byte[] buffer = new byte[content.length];
final InputStream in = new AzureReadFeature(session, context).read(test, new TransferStatus(), new DisabledConnectionCallback());
IOUtils.readFully(in, buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void testAppend() throws Exception {
final Path workdir = new SFTPHomeDirectoryService(session).find();
final Path test = new Path(workdir, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
new SFTPTouchFeature(session).touch(test, new TransferStatus());
assertTrue(new SFTPWriteFeature(session).append(test, new TransferStatus().withLength(1L).withRemote(new SFTPAttributesFinderFeature(session).find(test))).append);
assertTrue(new SFTPWriteFeature(session).append(test, new TransferStatus().exists(true).withLength(1L).withRemote(new SFTPAttributesFinderFeature(session).find(test))).append);
new SFTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void testWriteAccessDenied() throws Exception {
public void testAppend() throws Exception {
final DAVWriteFeature feature = new DAVWriteFeature(session);
final Path test = new DAVTouchFeature(session).touch(new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
assertTrue(feature.append(test, new TransferStatus().withLength(0L).withRemote(new DAVAttributesFinderFeature(session).find(test))).append);
assertTrue(feature.append(test, new TransferStatus().exists(true).withLength(0L).withRemote(new DAVAttributesFinderFeature(session).find(test))).append);
new DAVDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
}
}

0 comments on commit f4195a7

Please sign in to comment.