Skip to content

Commit

Permalink
Fix failing code coverage (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfantinhardesty authored Jan 15, 2025
1 parent 89c9265 commit 0bdbab7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ jobs:
shell: bash {0}
run: |-
set +x
./cloudfuse.test -test.v -test.coverprofile=${{ env.WORK_DIR }}/mount_cmd_all.cov mount all ${{ env.MOUNT_DIR }} --config-file=${{ env.cloudfuse_CFG }} --log-level=log_debug
./cloudfuse.test -test.v -test.coverprofile=${{ env.WORK_DIR }}/mount_cmd_all.cov mount all ${{ env.MOUNT_DIR }} --config-file=${{ env.cloudfuse_CFG }} --log-level=log_debug
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:
sudo apt remove mitmproxy -y
sudo apt-get install python3-setuptools -y
sudo apt install python3-pip -y
sudo pip3 install mitmproxy
sudo pip3 install mitmproxy --ignore-installed blinker
mitmdump -w proxy_logs.txt &
- name: Configure Proxy
Expand Down Expand Up @@ -504,7 +504,7 @@ jobs:
run: |
echo 'mode: count' > ./cloudfuse_coverage_raw.rpt
tail -q -n +2 ./*.cov >> ./cloudfuse_coverage_raw.rpt
cat ./cloudfuse_coverage_raw.rpt | grep -v mock_component | grep -v base_component | grep -v loopback | grep -v tools | grep -v "common/log" | grep -v "common/exectime" | grep -v "common/types.go" | grep -v "internal/stats_manager" | grep -v "main.go" | grep -v "component/azstorage/azauthmsi.go" | grep -v "component/azstorage/azauthspn.go" | grep -v "component/stream" | grep -v "component/azstorage/azauthcli.go" > ./cloudfuse_coverage.rpt
cat ./cloudfuse_coverage_raw.rpt | grep -v mock_component | grep -v base_component | grep -v loopback | grep -v tools | grep -v "common/log" | grep -v "common/exectime" | grep -v "common/types.go" | grep -v "internal/stats_manager" | grep -v "main.go" | grep -v "component/azstorage/azauthmsi.go" | grep -v "component/azstorage/azauthspn.go" | grep -v "component/stream" | grep -v "component/azstorage/azauthcli.go" > ./cloudfuse_coverage.rpt
go tool cover -func cloudfuse_coverage.rpt > ./cloudfuse_func_cover.rpt
go tool cover -html=./cloudfuse_coverage.rpt -o ./cloudfuse_coverage.html
go tool cover -html=./cloudfuse_ut.cov -o ./cloudfuse_ut.html
Expand Down Expand Up @@ -933,7 +933,7 @@ jobs:
rm -rf ${{ env.TEMP_DIR }}/*
./cloudfuse.test unmount all
./cloudfuse.test gen-test-config --config-file=azure_key.yaml --container-name=${{ matrix.containerName }} --temp-path=${{ env.TEMP_DIR }} --output-file=${{ env.cloudfuse_CFG }}
./cloudfuse.test -test.v -test.coverprofile=${{ env.WORK_DIR }}/secure_encrypt.cov secure encrypt --config-file=${{ env.cloudfuse_CFG }} --output-file=${{ env.WORK_DIR }}/cloudfuse.azsec --passphrase=12312312312312312312312312312312
./cloudfuse.test -test.v -test.coverprofile=${{ env.WORK_DIR }}/secure_encrypt.cov secure encrypt --config-file=${{ env.cloudfuse_CFG }} --output-file=${{ env.WORK_DIR }}/cloudfuse.azsec --passphrase=12312312312312312312312312312312
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down Expand Up @@ -986,7 +986,7 @@ jobs:
run: |
echo 'mode: count' > ./cloudfuse_coverage_raw.rpt
tail -q -n +2 ./*.cov >> ./cloudfuse_coverage_raw.rpt
cat ./cloudfuse_coverage_raw.rpt | grep -v mock_component | grep -v base_component | grep -v loopback | grep -v tools | grep -v "common/log" | grep -v "common/exectime" | grep -v "common/types.go" | grep -v "internal/stats_manager" | grep -v "main.go" | grep -v "component/azstorage/azauthmsi.go" | grep -v "component/azstorage/azauthspn.go" | grep -v "component/stream" | grep -v "component/azstorage/azauthcli.go" > ./cloudfuse_coverage.rpt
cat ./cloudfuse_coverage_raw.rpt | grep -v mock_component | grep -v base_component | grep -v loopback | grep -v tools | grep -v "common/log" | grep -v "common/exectime" | grep -v "common/types.go" | grep -v "internal/stats_manager" | grep -v "main.go" | grep -v "component/azstorage/azauthmsi.go" | grep -v "component/azstorage/azauthspn.go" | grep -v "component/stream" | grep -v "component/azstorage/azauthcli.go" > ./cloudfuse_coverage.rpt
go tool cover -func cloudfuse_coverage.rpt > ./cloudfuse_func_cover.rpt
go tool cover -html=./cloudfuse_coverage.rpt -o ./cloudfuse_coverage.html
go tool cover -html=./cloudfuse_ut.cov -o ./cloudfuse_ut.html
Expand Down

0 comments on commit 0bdbab7

Please sign in to comment.