Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvdb/sqlbase: fix params used in randRetryDelay #7955

Merged
merged 4 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ jobs:
- unit tags="kvdb_postgres"
- unit tags="kvdb_sqlite"
- btcd unit-race
- unit-module

steps:
- name: git checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -217,6 +219,7 @@ jobs:
path-to-profile: coverage.txt
parallel: true


########################
# run ubuntu integration tests
########################
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ unit: $(BTCD_BIN)
@$(call print, "Running unit tests.")
$(UNIT)

unit-module:
@$(call print, "Running submodule unit tests.")
scripts/unit_test_modules.sh
guggero marked this conversation as resolved.
Show resolved Hide resolved

unit-debug: $(BTCD_BIN)
@$(call print, "Running debug unit tests.")
$(UNIT_DEBUG)
Expand Down
27 changes: 27 additions & 0 deletions scripts/unit_test_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

IGNORE="tools"
SUBMODULES=$(find . -mindepth 2 -name "go.mod" | cut -d'/' -f2 | grep -v "$IGNORE")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


for submodule in $SUBMODULES
do
pushd $submodule

echo "Running submodule unit tests in $(pwd)"
echo "testing $submodule..."
go test -timeout=5m || exit 1

if [[ "$submodule" == "kvdb" ]]
then
echo "testing $submodule with sqlite..."
go test -tags="kvdb_sqlite" -timeout=5m || exit 1

echo "testing $submodule with postgres..."
go test -tags="kvdb_postgres" -timeout=5m || exit 1

echo "testing $submodule with etcd..."
go test -tags="kvdb_etcd" -timeout=5m || exit 1
fi

popd
done