Skip to content

Commit

Permalink
chore: add help testing
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Nov 7, 2024
1 parent 8a464f5 commit 95ccfc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gno.land/pkg/integration/testscript_gnoland.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ type testNode struct {
}

func SetupGnolandTestscript(t *testing.T, p *testscript.Params) error {
t.Helper()

tmpdir := t.TempDir()

gnoRootDir := gnoenv.RootDir()
Expand Down Expand Up @@ -149,6 +151,8 @@ func SetupGnolandTestscript(t *testing.T, p *testscript.Params) error {
}

func gnolandCmd(t *testing.T, nodes map[string]*testNode, gnolandBin, gnoRootDir, gnoHomeDir string) func(ts *testscript.TestScript, neg bool, args []string) {
t.Helper()

return func(ts *testscript.TestScript, neg bool, args []string) {
logger := ts.Value(envKeyLogger).(*slog.Logger)
sid := getNodeSID(ts)
Expand Down Expand Up @@ -540,6 +544,8 @@ func getTestingLogger(env *testscript.Env, logname string) (*slog.Logger, error)
}

func buildGnoland(t *testing.T, gnoroot, output string) error {
t.Helper()

t.Log("building gnoland binary...")
if _, err := os.Stat(output); err != nil {
if !errors.Is(err, os.ErrNotExist) {
Expand Down
1 change: 1 addition & 0 deletions gno.land/pkg/integration/testscript_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ func (t tSeqShim) Verbose() bool {
//
// Refer to package documentation in doc.go for more information on commands and example txtar scripts.
func RunSeqShimTestscripts(t *testing.T, p testscript.Params) {
t.Helper()
testscript.RunT(tSeqShim{t}, p)
}

0 comments on commit 95ccfc1

Please sign in to comment.