Skip to content

Commit

Permalink
reuse cloudserver dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Dec 31, 2024
1 parent fa332f3 commit bd19926
Show file tree
Hide file tree
Showing 4 changed files with 941 additions and 32 deletions.
5 changes: 0 additions & 5 deletions .github/actions/ft-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ inputs:
description: name to the runner script
required: false
default: run_ft_tests.bash
cloudserver_image:
description: name of the cloudserver image
required: false
default: "ghcr.io/scality/cloudserver:8.6.8"

runs:
using: composite
Expand All @@ -30,7 +26,6 @@ runs:
run: .github/scripts/${{ inputs.runner }} ft_test:${{ inputs.testsuite }}
env:
BACKBEAT_CONFIG_FILE: ${{ inputs.config }}
CLOUDSERVER_IMAGE: ${{ inputs.cloudserver_image }}

- uses: codecov/codecov-action@v4
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/scripts/run_ft_tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ NODE_PATH=${NODE_PATH:-node_modules}
# port for cloudserver
PORT=8000

if [ ! -d "${NODE_PATH}/@zenko/cloudserver" ]; then
echo "cloudserver module was not found!"
exit 1
fi

trap killandsleep EXIT

killandsleep () {
kill -9 $(lsof -t -i:$PORT) || true
sleep 10
}

docker run -p $PORT:8000 -d $CLOUDSERVER_IMAGE /bin/sh -c "yarn run mem_backend" & bash tests/utils/wait_for_local_port.bash $PORT 40
./node_modules/.bin/nyc --clean --silent yarn run $1
cd ${NODE_PATH}/@zenko/cloudserver && yarn run mem_backend & bash tests/utils/wait_for_local_port.bash $PORT 40./node_modules/.bin/nyc --clean --silent yarn run $1
./node_modules/.bin/nyc report --report-dir "./coverage/$1" --reporter=lcov
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"node-rdkafka-prometheus/prom-client": "^15.1.3"
},
"devDependencies": {
"@zenko/cloudserver": "git+https://github.com/scality/cloudserver#04438027c2066a6e6191569801fbe5831eb5c55d",
"c8": "^8.0.1",
"eslint": "^8.14.0",
"eslint-config-airbnb-base": "^13.1.0",
Expand Down
Loading

0 comments on commit bd19926

Please sign in to comment.