Verify that RPC was called
This commit is contained in:
parent
b373fbbe44
commit
6704f38ffc
1 changed files with 6 additions and 0 deletions
|
|
@ -400,7 +400,9 @@ func TestSessionHeartbeat(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRebuild(t *testing.T) {
|
||||
requestCount := 0
|
||||
getSharedServers := func(conn *jsonrpc2.Conn, req *jsonrpc2.Request) (interface{}, error) {
|
||||
requestCount++
|
||||
return true, nil
|
||||
}
|
||||
testServer, session, err := makeMockSession(
|
||||
|
|
@ -415,6 +417,10 @@ func TestRebuild(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("rebuilding codespace via mock session: %v", err)
|
||||
}
|
||||
|
||||
if requestCount == 0 {
|
||||
t.Fatalf("no requests were made")
|
||||
}
|
||||
}
|
||||
|
||||
type mockLogger struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue