Skip to content

Commit 0bc05d1

Browse files
committed
services/galexie: add integration tests for S3 storage.
1 parent dc4f4c8 commit 0bc05d1

File tree

5 files changed

+245
-59
lines changed

5 files changed

+245
-59
lines changed

.github/workflows/galexie-release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Galexie Release
1+
name: Galexie Release
22

33
on:
44
push:
@@ -16,6 +16,7 @@ jobs:
1616
# this is the multi-arch index sha, get it by 'docker buildx imagetools inspect stellar/quickstart:testing'
1717
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE: docker.io/stellar/quickstart:testing@sha256:5333ec87069efd7bb61f6654a801dc093bf0aad91f43a5ba84806d3efe4a6322
1818
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE_PULL: "false"
19+
GALEXIE_INTEGRATION_TESTS_LOCALSTACK_IMAGE_PULL: "false"
1920
STELLAR_CORE_VERSION: 22.3.0-2485.e643061a4.focal
2021
steps:
2122
- name: Set VERSION
@@ -29,6 +30,11 @@ jobs:
2930
shell: bash
3031
run: |
3132
docker pull "$GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE"
33+
34+
- name: Pull LocalStack image
35+
shell: bash
36+
run: docker pull localstack/localstack:latest
37+
3238
- name: Install captive core
3339
run: |
3440
# Workaround for https://github.com/actions/virtual-environments/issues/5245,
@@ -42,8 +48,11 @@ jobs:
4248
sudo apt-get update && sudo apt-get install -y stellar-core="$STELLAR_CORE_VERSION"
4349
echo "Using stellar core version $(stellar-core version)"
4450
45-
- name: Run tests
46-
run: go test -v -race -run TestGalexieTestSuite ./services/galexie/...
51+
- name: Run tests - GCS integration
52+
run: go test -v -race -run TestGalexieGCSTestSuite ./services/galexie/...
53+
54+
- name: Run tests - S3 integration
55+
run: go test -v -race -run TestGalexieS3TestSuite ./services/galexie/...
4756

4857
- name: Build docker
4958
run: make -C services/galexie docker-build

.github/workflows/galexie.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ on:
77

88
jobs:
99
galexie:
10-
name: Test
10+
name: Test ${{ matrix.storage_type }} integration
1111
runs-on: ubuntu-22.04
12+
strategy:
13+
matrix:
14+
storage_type: [ GCS, S3 ]
1215
env:
1316
CAPTIVE_CORE_DEBIAN_PKG_VERSION: 22.3.0-2485.e643061a4.focal
1417
GALEXIE_INTEGRATION_TESTS_ENABLED: "true"
@@ -17,6 +20,7 @@ jobs:
1720
# this is the multi-arch index sha, get it by 'docker buildx imagetools inspect stellar/quickstart:testing'
1821
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE: docker.io/stellar/quickstart:testing@sha256:5333ec87069efd7bb61f6654a801dc093bf0aad91f43a5ba84806d3efe4a6322
1922
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE_PULL: "false"
23+
GALEXIE_INTEGRATION_TESTS_LOCALSTACK_IMAGE_PULL: "false"
2024
steps:
2125
- name: Install captive core
2226
run: |
@@ -36,10 +40,16 @@ jobs:
3640
run: |
3741
docker pull "$GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE"
3842
43+
- name: Pull LocalStack image (for S3)
44+
if: ${{ matrix.storage_type == 'S3' }}
45+
shell: bash
46+
run: docker pull localstack/localstack:latest
47+
3948
- uses: actions/checkout@v3
4049
with:
4150
# For pull requests, build and test the PR head not a merge of the PR with the destination.
42-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
43-
44-
- name: Run test
45-
run: go test -v -race -run TestGalexieTestSuite ./services/galexie/...
51+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
52+
53+
- name: Run tests - ${{ matrix.storage_type }} integration
54+
run: |
55+
go test -v -race -run "TestGalexie${{ matrix.storage_type }}TestSuite" ./services/galexie/...

services/galexie/DEVELOPER_GUIDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Optional, can override the version of quickstart used to run standalone stellar
6565
Note, the version of stellar core in `GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE` and `GALEXIE_INTEGRATION_TESTS_CAPTIVE_CORE_BIN` needs to be on the same major rev or the captive core process may not be able to join or parse ledger meta from the `local` network created by `GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE`
6666

6767
```
68-
$ GALEXIE_INTEGRATION_TESTS_ENABLED=true go test -v -race -run TestGalexieTestSuite ./services/galexie/...
68+
$ GALEXIE_INTEGRATION_TESTS_ENABLED=true go test -v -race -run TestGalexieGCSTestSuite ./services/galexie/...
69+
$ GALEXIE_INTEGRATION_TESTS_ENABLED=true go test -v -race -run TestGalexieS3TestSuite ./services/galexie/...
6970
```
7071

7172
## Adding support for a new storage type

0 commit comments

Comments
 (0)