Skip to content

Commit 4a0f879

Browse files
committed
use configured rpc instead of localhost
1 parent c648765 commit 4a0f879

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ test:
6262
before_script:
6363
- go install github.com/boumenot/gocover-cobertura@v1.4.0
6464
script:
65-
- echo "=== waiting for rippled ==="
66-
- |
67-
for i in {1..30}; do
68-
if curl -s http://xrpld:5005 \
69-
-H "Content-Type: application/json" \
70-
-d '{"method":"server_info"}'; then
71-
echo "rippled is ready"
72-
break
73-
fi
74-
echo "waiting..."
75-
sleep 0.5
76-
done
7765
- go mod download
7866
- go test -coverpkg=./... -coverprofile=${COVERAGE_FILE} ./...
7967
- go tool cover -func=${COVERAGE_FILE}

Dockerfile.xrpld-ci

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
FROM xrpllabsofficial/xrpld:latest
22
COPY rippled-standalone.cfg /etc/opt/ripple/rippled.cfg
3+
RUN apt-get update && apt-get install -y curl
4+
35
CMD ["--standalone", "--start"]
6+
7+
HEALTHCHECK --interval=1s --timeout=1s --retries=20 \
8+
CMD curl -f http://localhost:5005 \
9+
-H "Content-Type: application/json" \
10+
-d '{"method":"server_info"}' || exit 1

internal/xrp/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func callRPC(method string, params ...any) (json.RawMessage, error) {
3232
}
3333

3434
resp, err := http.Post(
35-
"http://localhost:5005",
35+
rpcURL,
3636
"application/json",
3737
bytes.NewReader(reqBody),
3838
)

0 commit comments

Comments
 (0)