Allow to specify custom software name and version (#94)

In turn, this allows us to identify as ooniprobe-cli v3.0.0-rc.5.

Closes #41.
This commit is contained in:
Simone Basso 2019-12-29 14:07:57 +01:00 committed by GitHub
commit 1e8b482c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 7 deletions

View file

@ -19,7 +19,9 @@ func newTestingContext(t *testing.T) *ooni.Context {
testingConfig := path.Join("..", "testdata", "testing-config.json")
shutil.Copy(testingConfig, configPath, false)
ctx := ooni.NewContext(configPath, homePath)
err = ctx.Init()
swName := "ooniprobe-cli-tests"
swVersion := "3.0.0-alpha"
err = ctx.Init(swName, swVersion)
if err != nil {
t.Fatal(err)
}