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
27 changes: 14 additions & 13 deletions oap-http/oap-http-test/src/main/java/oap/http/test/HttpAsserts.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import static oap.http.test.HttpAsserts.HttpAssertion.assertHttpResponse;
import static oap.http.test.HttpAsserts.JsonHttpAssertion.assertJsonResponse;
import static oap.io.content.ContentReader.ofString;
import static oap.testng.Asserts.assertString;
import static oap.testng.Asserts.contentOfTestResource;
import static org.assertj.core.api.Assertions.assertThat;

Expand Down Expand Up @@ -220,52 +221,52 @@ public HttpAssertion isJson( String json ) {
}

public HttpAssertion hasReason( String reasonPhrase ) {
assertThat( response.reasonPhrase ).isEqualTo( reasonPhrase );
assertString( response.reasonPhrase ).isEqualTo( reasonPhrase );
return this;
}

public HttpAssertion reasonContains( String values ) {
assertThat( response.reasonPhrase ).contains( values );
assertString( response.reasonPhrase ).contains( values );
return this;
}

public HttpAssertion reasonContainsPattern( Pattern pattern ) {
assertThat( response.reasonPhrase ).containsPattern( pattern );
assertString( response.reasonPhrase ).containsPattern( pattern );
return this;
}

public HttpAssertion reasonContainsPattern( String pattern ) {
assertThat( response.reasonPhrase ).containsPattern( pattern );
assertString( response.reasonPhrase ).containsPattern( pattern );
return this;
}

public HttpAssertion hasContentType( String contentType ) {
assertThat( response.contentType ).isEqualTo( contentType );
assertString( response.contentType ).isEqualTo( contentType );
return this;
}

public HttpAssertion hasBody( String body ) {
assertThat( response.contentString() ).isEqualTo( body );
assertString( response.contentString() ).isEqualTo( body );
return this;
}

public HttpAssertion bodyContains( String values ) {
assertThat( response.contentString() ).contains( values );
assertString( response.contentString() ).contains( values );
return this;
}

public HttpAssertion bodyContainsPattern( Pattern pattern ) {
assertThat( response.contentString() ).containsPattern( pattern );
assertString( response.contentString() ).containsPattern( pattern );
return this;
}

public HttpAssertion bodyContainsPattern( String pattern ) {
assertThat( response.contentString() ).containsPattern( pattern );
assertString( response.contentString() ).containsPattern( pattern );
return this;
}

public HttpAssertion containsHeader( String name, String value ) {
assertThat( response.header( name ).orElse( null ) ).isEqualTo( value );
assertString( response.header( name ).orElse( null ) ).isEqualTo( value );
return this;
}

Expand Down Expand Up @@ -362,7 +363,7 @@ public static CookieHttpAssertion assertCookie( Cookie cookie ) {
}

public CookieHttpAssertion hasValue( String value ) {
assertThat( cookie.getValue() ).isEqualTo( value );
assertString( cookie.getValue() ).isEqualTo( value );
return this;
}

Expand All @@ -371,7 +372,7 @@ public CookieHttpAssertion hasValue( Object value ) {
}

public CookieHttpAssertion hasDomain( String domain ) {
assertThat( cookie.getDomain() ).isEqualTo( domain );
assertString( cookie.getDomain() ).isEqualTo( domain );
return this;
}

Expand All @@ -386,7 +387,7 @@ public CookieHttpAssertion expiresAfter( DateTime expiration ) {
}

public CookieHttpAssertion hasPath( String path ) {
assertThat( cookie.getPath() ).isEqualTo( path );
assertString( cookie.getPath() ).isEqualTo( path );
return this;
}

Expand Down
1 change: 0 additions & 1 deletion oap-stdlib-test/src/main/java/oap/testng/Asserts.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ public static String locationOfTestResource( Class<?> contetClass, @Nonnull Stri
return "/" + contetClass.getName().replace( ".", "/" ) + ( resource.startsWith( "/" ) ? "" : "/" ) + resource;
}

@Deprecated
public static class StringAssertion extends AbstractCharSequenceAssert<StringAssertion, CharSequence> {
protected StringAssertion( CharSequence value ) {
super( value, StringAssertion.class );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
public class FileSystem implements AutoCloseable {
private static final HashMap<String, Class<? extends FileSystemCloudApi>> providers = new HashMap<>();

private static final Cache<String, FileSystemCloudApi> apis = CacheBuilder
.newBuilder()
.removalListener( rl -> Closeables.close( ( FileSystemCloudApi ) rl.getValue() ) )
.build();

static {
try {
List<URL> urls = Resources.urls( FileSystem.class, "/cloud-service.properties" );
Expand All @@ -63,6 +58,10 @@ public class FileSystem implements AutoCloseable {
}

public final FileSystemConfiguration fileSystemConfiguration;
private final Cache<String, FileSystemCloudApi> apis = CacheBuilder
.newBuilder()
.removalListener( rl -> Closeables.close( ( FileSystemCloudApi ) rl.getValue() ) )
.build();

public FileSystem( FileSystemConfiguration fileSystemConfiguration ) {
this.fileSystemConfiguration = fileSystemConfiguration;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</distributionManagement>

<properties>
<oap.project.version>25.0.13</oap.project.version>
<oap.project.version>25.0.14</oap.project.version>

<oap.deps.config.version>22.0.1</oap.deps.config.version>
<oap.deps.oap-teamcity.version>25.0.0</oap.deps.oap-teamcity.version>
Expand Down