Skip to content

Commit

Permalink
Fix failing nacos tests (#5987)
Browse files Browse the repository at this point in the history
Motivation:

For some reason, it seems like the main CI doesn't run docker tests.
In any case, I found that Nacos tests are failing due to incorrect
server uri settings.

Modifications:

- Fixed the test URI to prepend a `/nacos` uri

Result:

- Nacos tests pass now

<!--
Visit this URL to learn more about how to write a pull request
description:

https://armeria.dev/community/developer-guide#how-to-write-pull-request-description
-->
  • Loading branch information
jrhee17 authored Nov 19, 2024
1 parent 4bc956f commit ec5269f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class NacosClientBuilderTest extends NacosTestBase {
void gets403WhenNoToken() throws Exception {
final HttpStatus status = WebClient.of(nacosUri())
.blocking()
.get("/nacos/v1/ns/service/list?pageNo=0&pageSize=10")
.get("/v1/ns/service/list?pageNo=0&pageSize=10")
.status();
assertThat(status).isEqualTo(HttpStatus.FORBIDDEN);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected static List<Endpoint> newSampleEndpoints() {
static void start() {
// Initialize Nacos Client
nacosUri = URI.create(
"http://" + nacosContainer.getHost() + ':' + nacosContainer.getMappedPort(8848));
"http://" + nacosContainer.getHost() + ':' + nacosContainer.getMappedPort(8848) + "/nacos");
}

protected static NacosClient client(@Nullable String serviceName, @Nullable String groupName) {
Expand Down

0 comments on commit ec5269f

Please sign in to comment.