diff options
Diffstat (limited to 'testdata/serve_expired_reply_ttl.rpl')
| -rw-r--r-- | testdata/serve_expired_reply_ttl.rpl | 75 |
1 files changed, 69 insertions, 6 deletions
diff --git a/testdata/serve_expired_reply_ttl.rpl b/testdata/serve_expired_reply_ttl.rpl index 06128a7369e7..0fe0eb3d3b47 100644 --- a/testdata/serve_expired_reply_ttl.rpl +++ b/testdata/serve_expired_reply_ttl.rpl @@ -19,8 +19,11 @@ SCENARIO_BEGIN Test serve-expired with reply-ttl ; Scenario overview: ; - query for example.com. IN A ; - check that we get an answer for example.com. IN A with the correct TTL +; - query for shorterttl.example.com. IN A +; - check that we get an answer for shorterttl.example.com. IN A with the correct TTL ; - query again right after the TTL expired -; - check that we get the expired cached answer with the configured TTL +; - check that we get the expired cached answer for example.com. with the configured TTL +; - check that we get the expired cached answer for shorterttl.example.com. with its own original TTL since it is shorter than the configured one ; ns.example.com. RANGE_BEGIN 0 100 @@ -44,7 +47,21 @@ RANGE_BEGIN 0 100 SECTION QUESTION example.com. IN A SECTION ANSWER - example.com. 10 IN A 5.6.7.8 + example.com. 200 IN A 5.6.7.8 + SECTION AUTHORITY + example.com. IN NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. IN A 1.2.3.4 + ENTRY_END + + ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + REPLY QR NOERROR + SECTION QUESTION + shorterttl.example.com. IN A + SECTION ANSWER + shorterttl.example.com. 121 IN A 5.6.7.8 SECTION AUTHORITY example.com. IN NS ns.example.com. SECTION ADDITIONAL @@ -68,15 +85,37 @@ ENTRY_BEGIN SECTION QUESTION example.com. IN A SECTION ANSWER - example.com. 10 IN A 5.6.7.8 + example.com. 200 IN A 5.6.7.8 + SECTION AUTHORITY + example.com. IN NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. IN A 1.2.3.4 +ENTRY_END + +STEP 11 QUERY +ENTRY_BEGIN + REPLY RD + SECTION QUESTION + shorterttl.example.com. IN A +ENTRY_END + + +STEP 12 CHECK_ANSWER +ENTRY_BEGIN + MATCH all ttl + REPLY QR RD RA NOERROR + SECTION QUESTION + shorterttl.example.com. IN A + SECTION ANSWER + shorterttl.example.com. 121 IN A 5.6.7.8 SECTION AUTHORITY example.com. IN NS ns.example.com. SECTION ADDITIONAL ns.example.com. IN A 1.2.3.4 ENTRY_END -; Wait for the TTL to expire -STEP 11 TIME_PASSES ELAPSE 3601 +; Wait for the TTL to expire (for all rrsets; default 3600) +STEP 20 TIME_PASSES ELAPSE 3600 ; Query again STEP 30 QUERY @@ -101,7 +140,31 @@ ENTRY_BEGIN ns.example.com. 123 A 1.2.3.4 ENTRY_END +; Query again for shorter ttl +STEP 50 QUERY +ENTRY_BEGIN + REPLY RD DO + SECTION QUESTION + shorterttl.example.com. IN A +ENTRY_END + +; Check that we got a stale answer +; Note: auth, additional rrsets are already updated from previous recursion. +STEP 60 CHECK_ANSWER +ENTRY_BEGIN + MATCH all ttl ede=3 + REPLY QR RD RA DO NOERROR + SECTION QUESTION + shorterttl.example.com. IN A + SECTION ANSWER + shorterttl.example.com. 121 A 5.6.7.8 + SECTION AUTHORITY + example.com. 3600 NS ns.example.com. + SECTION ADDITIONAL + ns.example.com. 3600 A 1.2.3.4 +ENTRY_END + ; Give time for the pending query to get answered -STEP 41 TRAFFIC +STEP 61 TRAFFIC SCENARIO_END |
