test: failed to get sub viper (#20981)

This commit is contained in:
zakir 2024-07-18 14:49:33 +08:00 committed by GitHub
parent f7293da17f
commit d8b9b6916a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 1 deletions

View File

@ -14,6 +14,30 @@ concurrency:
cancel-in-progress: true
jobs:
server-v2:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
server/v2/*.go
server/v2/go.mod
server/v2/go.sum
server/v2/testdata/*.toml
- name: test & coverage report creation
if: env.GIT_DIFF
run: |
cd server/v2 && go test -mod=readonly -race -timeout 30m -covermode=atomic -tags='ledger test_ledger_mock'
stf:
runs-on: ubuntu-latest
strategy:

View File

@ -129,6 +129,6 @@ func TestReadConfig(t *testing.T) {
require.NoError(t, err)
grpcConfig := grpc.DefaultConfig()
err = v.Sub("grpc-server").Unmarshal(&grpcConfig)
err = v.Sub("grpc").Unmarshal(&grpcConfig)
require.NoError(t, err)
}