Skip to content

Commit

Permalink
test: fix sims (backport #21735) (#21738)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
mergify[bot] and julienrbrt committed Sep 15, 2024
1 parent 150d17c commit 18b6e63
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ jobs:
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ success() }}
steps:
Expand Down Expand Up @@ -111,7 +116,12 @@ jobs:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ failure() }}
steps:
Expand Down
7 changes: 6 additions & 1 deletion server/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,12 @@ func (m mapGetter) Get(key string) interface{} {
}

func (m mapGetter) GetString(key string) string {
return m[key].(string)
str, ok := m[key]
if !ok {
return ""
}

return str.(string)
}

var _ servertypes.AppOptions = mapGetter{}
7 changes: 6 additions & 1 deletion testutils/sims/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@ func (f AppOptionsFn) Get(k string) any {
}

func (f AppOptionsFn) GetString(k string) string {
return f(k).(string)
str, ok := f(k).(string)
if !ok {
return ""
}

return str
}

// FauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of
Expand Down

0 comments on commit 18b6e63

Please sign in to comment.