Skip to content

Commit baaa95f

Browse files
committedMar 3, 2023
remove lockfile
Signed-off-by: Oleg S <[email protected]>
1 parent b50053d commit baaa95f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎test-kuttl/e2e-copy/private-network/10-test-data-creation.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ main() {
4545

4646
# this fails
4747
echo "grabbing the content ID"
48-
myCID=$(kubectl exec -n "${NAMESPACE}" "${ipfsClusterPodName}" -c ipfs-cluster -- sh -c 'ipfs-cluster-ctl add /tmp/testfile.txt' | awk '{print $2}')
48+
myCID=$(kubectl exec -n "${NAMESPACE}" "${ipfsClusterPodName}" -c ipfs-cluster -- sh -c 'if [ -e /data/ipfs/repo.lock ]; then rm /data/ipfs/repo.lock; fi; ipfs-cluster-ctl add /tmp/testfile.txt' | awk '{print $2}')
4949
echo "content ID is: ${myCID}"
5050

5151
# read the value
@@ -59,7 +59,7 @@ main() {
5959
results=$(kubectl exec -n "${NAMESPACE}" "${ipfsClusterPodname2}" -c ipfs-cluster -- sh -c 'ls -al /data/ipfs' | grep 'repo.lock')
6060
echo "lockfile: ${results}"
6161

62-
ipfsCommand="ipfs get --output /tmp/myfile.txt -- ${myCID}"
62+
ipfsCommand="if [ -e /data/ipfs/repo.lock ]; then rm /data/ipfs/repo.lock; fi; ipfs get --output /tmp/myfile.txt -- ${myCID}"
6363
echo "reading a file from ${ipfsClusterPodname2} using command: '${ipfsCommand}'"
6464
kubectl exec -n "${NAMESPACE}" "${ipfsClusterPodname2}" -c ipfs -- sh -c "${ipfsCommand}"
6565
echo "success!"

0 commit comments

Comments
 (0)
Please sign in to comment.