Skip to content

Commit

Permalink
itest: enhance getinfo test to verify CLI functionality
Browse files Browse the repository at this point in the history
Update the existing `getinfo` integration test to ensure the
same results can be reproduced using the new command-line
functionality.
  • Loading branch information
ffranr committed Jan 21, 2025
1 parent 490c777 commit 2a3ca21
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions itest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,14 @@ func testGetInfo(t *harnessTest) {
// Ensure network field is set correctly.
expectedNetwork := t.tapd.cfg.NetParams.Name
require.Equal(t.t, expectedNetwork, resp.Network)

// Attempt to get the info using the CLI.
respGeneric, err := ExecTapCLI(ctxt, t.tapd, "getinfo")
require.NoError(t.t, err)

// Type assert the response to the expected type.
respCli := respGeneric.(*taprpc.GetInfoResponse)

// Ensure the response matches the expected response.
require.Equal(t.t, resp, respCli)
}

0 comments on commit 2a3ca21

Please sign in to comment.