refactor(inputloader): better docs and naming (#265)
* refactor(inputloader): better docs and naming Work done as part of https://github.com/ooni/probe/issues/1299. * fix: correct a typo
This commit is contained in:
parent
c94721d9e5
commit
0115d6c470
9 changed files with 59 additions and 35 deletions
|
|
@ -211,7 +211,7 @@ func TestInputLoaderInputOrQueryTestListsWithInput(t *testing.T) {
|
|||
"testdata/inputloader1.txt",
|
||||
"testdata/inputloader2.txt",
|
||||
},
|
||||
InputPolicy: engine.InputOrQueryTestLists,
|
||||
InputPolicy: engine.InputOrQueryBackend,
|
||||
})
|
||||
ctx := context.Background()
|
||||
out, err := il.Load(ctx)
|
||||
|
|
@ -247,7 +247,7 @@ func TestInputLoaderInputOrQueryTestListsWithNoInputAndCancelledContext(t *testi
|
|||
}
|
||||
defer sess.Close()
|
||||
il := engine.NewInputLoader(engine.InputLoaderConfig{
|
||||
InputPolicy: engine.InputOrQueryTestLists,
|
||||
InputPolicy: engine.InputOrQueryBackend,
|
||||
Session: sess,
|
||||
})
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
|
@ -282,7 +282,7 @@ func TestInputLoaderInputOrQueryTestListsWithNoInput(t *testing.T) {
|
|||
}
|
||||
defer sess.Close()
|
||||
il := engine.NewInputLoader(engine.InputLoaderConfig{
|
||||
InputPolicy: engine.InputOrQueryTestLists,
|
||||
InputPolicy: engine.InputOrQueryBackend,
|
||||
Session: sess,
|
||||
URLLimit: 30,
|
||||
})
|
||||
|
|
@ -298,7 +298,7 @@ func TestInputLoaderInputOrQueryTestListsWithNoInput(t *testing.T) {
|
|||
|
||||
func TestInputLoaderInputOrQueryTestListsWithEmptyFile(t *testing.T) {
|
||||
il := engine.NewInputLoader(engine.InputLoaderConfig{
|
||||
InputPolicy: engine.InputOrQueryTestLists,
|
||||
InputPolicy: engine.InputOrQueryBackend,
|
||||
SourceFiles: []string{
|
||||
"testdata/inputloader1.txt",
|
||||
"testdata/inputloader3.txt", // we want it before inputloader2.txt
|
||||
|
|
|
|||
Loading…
Reference in a new issue