ooni-probe-cli/internal/engine
Simone Basso e0b0dfedc1
feat(session): expose CheckIn method (#266)
* feat(session): expose CheckIn method

It seems to me the right thing to do is to query the CheckIn API
from the Session rather than querying it from InputLoader.

Then, InputLoader could just take a reference to a Session-like
interface that allows this functionality.

So, this diff exposes the Session.CheckIn method.

Doing that, in turn, required some refactoring to allow for
more and better unit tests.

While doing that, I also noticed that Session required a mutex
to be a well-behaving type, so I did that.

While doing that, I also tried to cover all the lines in session.go
and, as part of that, I have removed unused code.

Reference issue: https://github.com/ooni/probe/issues/1299.

* fix: reinstate comment I shan't have removed

* fix: repair broken test

* fix: a bit more coverage, annotations, etc.

* Update internal/engine/session.go

* Update internal/engine/session_integration_test.go

* Update internal/engine/session_internal_test.go
2021-03-29 15:04:41 +02:00
..
atomicx chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment fix(webconnectivity): expose network events (#258) 2021-03-23 16:46:46 +01:00
geolocate Add signal to the im test group (#259) 2021-03-22 14:31:50 +01:00
httpheader Release 3.6.0 (#239) 2021-03-03 14:42:17 +01:00
httpx refactor: move more commands to internal/cmd (#207) 2021-02-03 12:23:15 +01:00
humanizex refactor: miniooni should be outside of the engine (#206) 2021-02-03 11:21:10 +01:00
internal refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
kvstore refactor: move more commands to internal/cmd (#207) 2021-02-03 12:23:15 +01:00
legacy Release 3.6.0 (#239) 2021-03-03 14:42:17 +01:00
model feat(ExperimentOrchestraClient): add CheckIn (#263) 2021-03-25 12:02:02 +01:00
netx fix(webconnectivity): expose network events (#258) 2021-03-23 16:46:46 +01:00
ooapi feat(ooapi): add toplevel client and simplify API (#248) 2021-03-19 09:30:42 +01:00
probeservices fix: apply staticcheck suggestions (#262) 2021-03-24 12:35:53 +01:00
resources Release 3.6.0 (#239) 2021-03-03 14:42:17 +01:00
resourcesmanager Release 3.6.0 (#239) 2021-03-03 14:42:17 +01:00
runtimex refactor: start building an Android package (#205) 2021-02-03 10:51:14 +01:00
shellx fix: use golang.org/x/sys/execabs (#224) 2021-02-10 07:40:48 +01:00
testdata fix: add missing files causing tests to fail (#202) 2021-02-02 14:18:22 +01:00
.gitignore refactor: move more commands to internal/cmd (#207) 2021-02-03 12:23:15 +01:00
allexperiments.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
experiment_integration_test.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
experiment_internal_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment.go feat(session): expose CheckIn method (#266) 2021-03-29 15:04:41 +02:00
experimentbuilder_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experimentbuilder.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputloader_integration_test.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputloader_test.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputloader.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputprocessor_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
inputprocessor.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
kvstore_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
kvstore.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
session_integration_test.go feat(session): expose CheckIn method (#266) 2021-03-29 15:04:41 +02:00
session_internal_test.go feat(session): expose CheckIn method (#266) 2021-03-29 15:04:41 +02:00
session.go feat(session): expose CheckIn method (#266) 2021-03-29 15:04:41 +02:00
submitter_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
submitter.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00