Skip to content

Commit ed06330

Browse files
dlamarmorganStorj Robot
authored andcommitted
test/spanner/uplink: add basic spanner integration test
Change-Id: I8e72a7ff6cccc49a16526f24ca19cdbd152625f4
1 parent cf396e7 commit ed06330

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

Earthfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ test:
5757

5858
integration-all:
5959
BUILD ./test/uplink+test
60+
BUILD ./test/spanner/uplink+test
6061
BUILD ./test/edge+test
6162
BUILD ./test/storjscan+test
6263

Jenkinsfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ pipeline {
3535
sh "earthly -P ./test/uplink+test"
3636
}
3737
}
38+
stage('Uplink - Spanner') {
39+
steps {
40+
sh "earthly -P ./test/spanner/uplink+test"
41+
}
42+
}
3843
stage('Edge') {
3944
steps {
4045
sh "earthly -P ./test/edge+test"

test/spanner/uplink/Earthfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
VERSION 0.6
2+
# integration tests
3+
test:
4+
FROM earthly/dind:ubuntu
5+
WORKDIR /go/storj-up
6+
COPY ../../../+build-app/storj-up .
7+
# setup test environment
8+
RUN /go/storj-up/storj-up init minimal,db,spanner,uplink
9+
COPY . .
10+
WITH DOCKER --compose docker-compose.yaml
11+
RUN docker compose exec -T -u 0 uplink bash -c 'storj-up health --host cockroach -d 120' && \
12+
docker compose exec -T -u 0 uplink bash -c 'storj-up credentials -s satellite-api:7777 -c satellite-api:10000 -e >> ~/.bashrc' && \
13+
< basic_upload_download.sh docker compose exec -T -u 0 uplink bash -i
14+
END
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dd if=/dev/random of=data count=10240 bs=1024
2+
sha256sum data > sha256.sum
3+
4+
BUCKET=buckett$RANDOM
5+
uplink --interactive=false mb sj://$BUCKET
6+
uplink --interactive=false cp data sj://$BUCKET/data
7+
8+
rm data
9+
uplink --interactive=false cp sj://$BUCKET/data data
10+
sha256sum -c sha256.sum

0 commit comments

Comments
 (0)