Skip to content

Commit

Permalink
test/spanner/uplink: add basic spanner integration test
Browse files Browse the repository at this point in the history
Change-Id: I8e72a7ff6cccc49a16526f24ca19cdbd152625f4
  • Loading branch information
dlamarmorgan authored and Storj Robot committed Sep 12, 2024
1 parent cf396e7 commit ed06330
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ test:

integration-all:
BUILD ./test/uplink+test
BUILD ./test/spanner/uplink+test
BUILD ./test/edge+test
BUILD ./test/storjscan+test

Expand Down
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ pipeline {
sh "earthly -P ./test/uplink+test"
}
}
stage('Uplink - Spanner') {
steps {
sh "earthly -P ./test/spanner/uplink+test"
}
}
stage('Edge') {
steps {
sh "earthly -P ./test/edge+test"
Expand Down
14 changes: 14 additions & 0 deletions test/spanner/uplink/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
VERSION 0.6
# integration tests
test:
FROM earthly/dind:ubuntu
WORKDIR /go/storj-up
COPY ../../../+build-app/storj-up .
# setup test environment
RUN /go/storj-up/storj-up init minimal,db,spanner,uplink
COPY . .
WITH DOCKER --compose docker-compose.yaml
RUN docker compose exec -T -u 0 uplink bash -c 'storj-up health --host cockroach -d 120' && \
docker compose exec -T -u 0 uplink bash -c 'storj-up credentials -s satellite-api:7777 -c satellite-api:10000 -e >> ~/.bashrc' && \
< basic_upload_download.sh docker compose exec -T -u 0 uplink bash -i
END
10 changes: 10 additions & 0 deletions test/spanner/uplink/basic_upload_download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dd if=/dev/random of=data count=10240 bs=1024
sha256sum data > sha256.sum

BUCKET=buckett$RANDOM
uplink --interactive=false mb sj://$BUCKET
uplink --interactive=false cp data sj://$BUCKET/data

rm data
uplink --interactive=false cp sj://$BUCKET/data data
sha256sum -c sha256.sum

0 comments on commit ed06330

Please sign in to comment.