Skip to content

Commit

Permalink
PBM remove crutches for azurite
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandr-havryliak committed Aug 5, 2024
1 parent bed0fe5 commit a2bde61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions pbm-functional/pytest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ RUN mkdir -p /pbm-old && mkdir -p /pbm-new && \
git clone https://github.com/percona/percona-backup-mongodb.git && cd percona-backup-mongodb && \
if [ -n "$PR_NUMBER" ]; then git fetch origin pull/$PR_NUMBER/head:CURRENT_PR; PBM_BRANCH=CURRENT_PR; fi && \
git checkout $PBM_BRANCH && \
sed -E "s|(.+)https://%s.blob.core.windows.net|\1http://azurite:10000/%s/|" -i pbm/storage/azure/azure.go && \
make build && cp -rpf bin/* /pbm-new/ && rm -rf bin && \
git reset --hard && \
git branch -r | grep release | sed 's/origin\///'| grep -v $PBM_BRANCH | sort --version-sort | tail -1 | xargs git checkout && \
git pull && \
sed -E "s|(.+)https://%s.blob.core.windows.net|\1http://azurite:10000/%s/|" -i pbm/storage/azure/azure.go && \
make build && cp -rpf bin/* /pbm-old/ && rm -rf bin

FROM $PSMDB
Expand Down
4 changes: 3 additions & 1 deletion pbm-functional/pytest/test_azurite.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def start_cluster(cluster, request):
cluster.setup_pbm()
azure_account = "devstoreaccount1"
azure_key = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
result = cluster.exec_pbm_cli("config --set storage.type=azure --set storage.azure.account=" + azure_account +
azure_endpoint = "http://azurite:10000/" + azure_account
result = cluster.exec_pbm_cli("config --set storage.type=azure --set storage.azure.endpointUrl=" + azure_endpoint +
" --set storage.azure.account=" + azure_account +
" --set storage.azure.container=test-container --set storage.azure.credentials.key=" + azure_key +
" --out json")
Cluster.log("Setup PBM with azurite storage:\n" + result.stdout)
Expand Down

0 comments on commit a2bde61

Please sign in to comment.