mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-17 05:44:57 +00:00
test(lib/policy/config): amend tests
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -109,7 +109,7 @@ func TestBotValid(t *testing.T) {
|
|||||||
Action: RuleChallenge,
|
Action: RuleChallenge,
|
||||||
PathRegex: p("Mozilla"),
|
PathRegex: p("Mozilla"),
|
||||||
Challenge: &ChallengeRules{
|
Challenge: &ChallengeRules{
|
||||||
Difficulty: 0,
|
Difficulty: -1,
|
||||||
ReportAs: 4,
|
ReportAs: 4,
|
||||||
Algorithm: "fast",
|
Algorithm: "fast",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ func TestThresholdValid(t *testing.T) {
|
|||||||
name: "challenge invalid",
|
name: "challenge invalid",
|
||||||
input: &Threshold{
|
input: &Threshold{
|
||||||
Action: RuleChallenge,
|
Action: RuleChallenge,
|
||||||
Challenge: &ChallengeRules{Difficulty: 0, ReportAs: 0},
|
Challenge: &ChallengeRules{Difficulty: -1, ReportAs: -1},
|
||||||
},
|
},
|
||||||
err: ErrChallengeDifficultyTooLow,
|
err: ErrChallengeDifficultyTooLow,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user