Skip to content

Commit

Permalink
#405 more tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 10, 2023
1 parent 778aa91 commit a925d8a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion s3auth-hosts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-dynamo</artifactId>
<version>0.22.3</version>
<version>0.22.4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Empty file.
1 change: 0 additions & 1 deletion s3auth-hosts/src/main/aspect/README.txt

This file was deleted.

10 changes: 10 additions & 0 deletions s3auth-hosts/src/main/java/com/s3auth/hosts/DefaultHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ public void close() {
public Resource fetch(@NotNull final URI uri,
@NotNull final Range range, @NotNull final Version version)
throws IOException {
if (this.bucket.key().isEmpty()) {
throw new IllegalStateException(
"The key of the bucket is empty"
);
}
if (this.bucket.secret().isEmpty()) {
throw new IllegalStateException(
"The secret of the bucket is empty"
);
}
Resource resource = null;
final Collection<String> errors = new LinkedList<>();
final DomainStatsData data = new H2DomainStatsData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private MkRegion mockRegion(
)
);
final Table tbl = region.table(table);
for (int num = 0; num < 20; ++num) {
for (int num = 0; num < 3; ++num) {
tbl.put(this.item());
}
return region;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void fetchesRealObjectFromAmazonBucket() throws Exception {
final String key = System.getProperty("failsafe.aws.key");
final String secret = System.getProperty("failsafe.aws.secret");
Assume.assumeThat(key, Matchers.notNullValue());
Assume.assumeThat(key.isEmpty(), Matchers.is(false));
final Host host = new DefaultHost(
new DefaultBucket(
new DomainMocker().init()
Expand Down
5 changes: 5 additions & 0 deletions s3auth-relay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<version>1.19.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
Expand Down

0 comments on commit a925d8a

Please sign in to comment.