Skip to content

Commit

Permalink
sharness?
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jan 30, 2024
1 parent e3f026d commit 67fecbd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/sharness/t0003-docker-migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,19 @@ test_expect_success "make repo be version 4" '
'

test_expect_success "setup http response" '
mkdir migration &&
echo "v1.1.1" > migration/versions &&
mkdir -p migration/fs-repo-6-to-7 &&
echo "v1.1.1" > migration/fs-repo-6-to-7/versions &&
CID=$(ipfs add -r -Q migration) &&
echo "HTTP/1.1 200 OK" > vers_resp &&
echo "Content-Length: 7" >> vers_resp &&
echo "Content-Type: application/vnd.ipld.car" >> vers_resp &&
echo "" >> vers_resp &&
echo "v1.1.1" >> vers_resp
ipfs dag export $CID >> vers_resp
'

test_expect_success "make repo be version 4" '
echo 4 > "$IPFS_PATH/version"
'

test_expect_success "startup fake dists server" '
Expand All @@ -53,7 +62,7 @@ test_expect_success "startup fake dists server" '
'

test_expect_success "docker image runs" '
DOC_ID=$(docker run -d -v "$IPFS_PATH":/data/ipfs --net=host "$IMAGE_TAG")
DOC_ID=$(docker run -d -v "$IPFS_PATH":/data/ipfs -e IPFS_DIST_PATH=/ipfs/$CID --net=host "$IMAGE_TAG")
'

test_expect_success "docker container tries to pull migrations from netcat" '
Expand Down

0 comments on commit 67fecbd

Please sign in to comment.