Skip to content

Commit b377f28

Browse files
committed
modify
1 parent 267b0bf commit b377f28

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/test/java/org/apache/skywalking/banyandb/v1/client/BanyanDBAuthTest.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.nio.file.Path;
3434
import java.nio.file.Paths;
3535
import java.nio.file.attribute.PosixFilePermissions;
36+
import java.util.Base64;
3637
import java.util.List;
3738
import java.util.concurrent.TimeUnit;
3839

@@ -66,9 +67,15 @@ public BanyanDBAuthTest() throws Exception {
6667
MountableFile.forHostPath(tempConfigPath),
6768
"/tmp/bydb_server_config.yaml"
6869
)
69-
.withCommand("standalone", "--auth-config-file", "/tmp/bydb_server_config.yaml")
70+
.withCommand("standalone",
71+
"--auth-config-file", "/tmp/bydb_server_config.yaml",
72+
"--enable-health-auth", "true"
73+
)
7074
.withExposedPorts(GRPC_PORT, HTTP_PORT)
71-
.waitingFor(Wait.forHttp("/api/healthz").forPort(HTTP_PORT));
75+
.waitingFor(Wait.forHttp("/api/healthz")
76+
.withHeader("Authorization",
77+
"Basic " + Base64.getEncoder().encodeToString("admin:123456".getBytes()))
78+
.forPort(HTTP_PORT));
7279
}
7380

7481
@Test

0 commit comments

Comments
 (0)