| 116 | ) |
| 117 | |
| 118 | func assertOnlineStatus(t testing.TB, onlineStatus OnlineStatus) { |
| 119 | config := hctx.GetConf(hctx.MakeContext()) |
| 120 | if onlineStatus == Online && config.IsOffline { |
| 121 | t.Fatalf("We're supposed to be online, yet config.IsOffline=%#v (config=%#v)", config.IsOffline, config) |
| 122 | } |
| 123 | if onlineStatus == Offline && !config.IsOffline { |
| 124 | t.Fatalf("We're supposed to be offline, yet config.IsOffline=%#v (config=%#v)", config.IsOffline, config) |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | func hishtoryQuery(t testing.TB, tester shellTester, query string) string { |
| 129 | return tester.RunInteractiveShell(t, "hishtory query "+query) |