1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Add global option POLLING_PARSING_ERROR_LIMIT

This commit is contained in:
Shizun Ge 2021-01-25 23:41:36 -06:00 committed by GitHub
parent b45c1cf327
commit 7c44238bae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 7 deletions

View file

@ -761,6 +761,24 @@ func TestDefautSchedulerCountBasedMinInterval(t *testing.T) {
}
}
func TestPollingParsingErrorLimit(t *testing.T) {
os.Clearenv()
os.Setenv("POLLING_PARSING_ERROR_LIMIT", "100")
parser := NewParser()
opts, err := parser.ParseEnvironmentVariables()
if err != nil {
t.Fatalf(`Parsing failure: %v`, err)
}
expected := 100
result := opts.PollingParsingErrorLimit()
if result != expected {
t.Fatalf(`Unexpected POLLING_SCHEDULER value, got %v instead of %v`, result, expected)
}
}
func TestOAuth2UserCreationWhenUnset(t *testing.T) {
os.Clearenv()