Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.io.FileNotFoundException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.Files;
Expand Down Expand Up @@ -81,6 +82,9 @@ protected void execute(OzoneClient client, OzoneAddress address)
String keyName = address.getKeyName();

File dataFile = new File(fileName);
if (!dataFile.exists()) {
throw new FileNotFoundException("Error: File not found: " + fileName);
}

if (isVerbose()) {
try (InputStream stream = Files.newInputStream(dataFile.toPath())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Test ozone shell errors
${result} = Execute and checkrc ozone sh bucket create ${protocol}${server}/${volume}/bucket1 255
Should contain ${result} QUOTA_ERROR
Execute and checkrc ozone sh volume delete ${protocol}${server}/${volume} 0


${result} = Execute and checkrc ozone sh key put ${protocol}${server}/${volume}/bucket1/key1 sample.txt 255
Should Match Regexp ${result} Error: File not found: .*

Test Volume Acls
[arguments] ${protocol} ${server} ${volume}
Expand Down