Restructure 5 existing .robot files into 10 numbered files, one per feature area in Docs/Features.md. Each file is independently runnable. Add api.resource + data.resource for CSRF/XFF-aware wrappers and RFC5737 IP generators. Coverage: 110 new tests across login, dashboard, map, jails, config, history, blocklists, layout. Uses existing data-testid/aria-label/role selectors only — no frontend changes. Tests bypass per-IP rate limits via X-Forwarded-For header rotation. Hard rule preserved: failures are findings, never app-code fixes.
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
*** Settings ***
|
|
Documentation Test data generators — unique IPs, jail names,
|
|
... timestamps, RFC5737 documentation-only address ranges.
|
|
|
|
*** Keywords ***
|
|
Random Test Net 3 Ip
|
|
[Documentation] Returns an IP from RFC5737 203.0.113.0/24 (TEST-NET-3).
|
|
${octet}= Evaluate random.randint(1, 254) modules=random
|
|
${ip}= Set Variable 203.0.113.${octet}
|
|
RETURN ${ip}
|
|
|
|
Random Test Net 2 Ip
|
|
[Documentation] Returns an IP from RFC5737 198.51.100.0/24 (TEST-NET-2).
|
|
${octet}= Evaluate random.randint(1, 254) modules=random
|
|
${ip}= Set Variable 198.51.100.${octet}
|
|
RETURN ${ip}
|
|
|
|
Random Xff Ip
|
|
[Documentation] Returns an IP from RFC5737 192.0.2.0/24 (TEST-NET-1) for XFF headers.
|
|
${octet}= Evaluate random.randint(1, 254) modules=random
|
|
${ip}= Set Variable 192.0.2.${octet}
|
|
RETURN ${ip}
|
|
|
|
Unique Suffix
|
|
[Documentation] Returns a unique suffix combining timestamp + random suffix
|
|
... so resources created in successive tests don't collide.
|
|
${ts}= Evaluate int(time.time()) modules=time
|
|
${rand}= Evaluate random.randint(1000, 9999) modules=random
|
|
${suffix}= Set Variable ${ts}-${rand}
|
|
RETURN ${suffix}
|
|
|
|
Unique Jail Name
|
|
[Documentation] Returns a unique jail name with timestamp + random suffix.
|
|
${suffix}= Unique Suffix
|
|
${name}= Set Variable test-jail-${suffix}
|
|
RETURN ${name}
|
|
|
|
Unique Blocklist Name
|
|
[Documentation] Returns a unique blocklist source name.
|
|
${suffix}= Unique Suffix
|
|
${name}= Set Variable test-source-${suffix}
|
|
RETURN ${name}
|
|
|
|
Unique Timestamp
|
|
[Documentation] Returns a Unix timestamp as integer.
|
|
${ts}= Evaluate int(time.time()) modules=time
|
|
RETURN ${ts}
|
|
|
|
Iso Now
|
|
[Documentation] Returns current time in ISO 8601 (UTC).
|
|
${iso}= Evaluate __import__('datetime').datetime.utcnow().isoformat() + 'Z' modules=__import__
|
|
RETURN ${iso}
|