Browse Source

sort pdns tests

preview
Stefan Bühler 4 years ago
parent
commit
adc8bb1f4f
  1. 74
      lib/dnsbox-base/src/records/powerdns_tests.rs

74
lib/dnsbox-base/src/records/powerdns_tests.rs

@ -358,6 +358,25 @@ fn test_KEY() {
);
}
#[test]
fn test_AAAA() {
check(types::AAAA,
"fe80::250:56ff:fe9b:114",
None,
b"\xFE\x80\x00\x00\x00\x00\x00\x00\x02\x50\x56\xFF\xFE\x9B\x01\x14",
);
check(types::AAAA,
"2a02:1b8:10:2::151",
None,
b"\x2a\x02\x01\xb8\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x01\x51",
);
check(types::AAAA,
"::1",
None,
b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01",
);
}
#[test]
fn test_LOC() {
check(types::LOC,
@ -382,25 +401,6 @@ fn test_LOC() {
);
}
#[test]
fn test_AAAA() {
check(types::AAAA,
"fe80::250:56ff:fe9b:114",
None,
b"\xFE\x80\x00\x00\x00\x00\x00\x00\x02\x50\x56\xFF\xFE\x9B\x01\x14",
);
check(types::AAAA,
"2a02:1b8:10:2::151",
None,
b"\x2a\x02\x01\xb8\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x01\x51",
);
check(types::AAAA,
"::1",
None,
b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01",
);
}
#[test]
fn test_SRV() {
// local name
@ -736,20 +736,6 @@ fn test_EUI64() {
);
}
#[test]
fn test_TSIG() {
check(types::TSIG,
"HMAC-MD5.SIG-ALG.REG.INT. 1368386956 60 16 TkbpD66/Mtgo8GUEFZIwhg== 12345 0 0",
None,
b"\x08HMAC-MD5\x07SIG-ALG\x03REG\x03INT\x00\x00\x00\x51\x8f\xed\x8c\x00\x3c\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86\x30\x39\x00\x00\x00\x00",
);
check(types::TSIG,
"HMAC-MD5.SIG-ALG.REG.INT. 1368386956 60 16 TkbpD66/Mtgo8GUEFZIwhg== 12345 18 16 TkbpD66/Mtgo8GUEFZIwhg==",
None,
b"\x08HMAC-MD5\x07SIG-ALG\x03REG\x03INT\x00\x00\x00\x51\x8f\xed\x8c\x00\x3c\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86\x30\x39\x00\x12\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86",
);
}
#[test]
fn test_TKEY() {
check(types::TKEY,
@ -760,11 +746,16 @@ fn test_TKEY() {
}
#[test]
fn test_DLV() {
check(types::DLV,
"20642 8 2 04443abe7e94c3985196beae5d548c727b044dda5151e60d7cd76a9fd931d00e",
fn test_TSIG() {
check(types::TSIG,
"HMAC-MD5.SIG-ALG.REG.INT. 1368386956 60 16 TkbpD66/Mtgo8GUEFZIwhg== 12345 0 0",
None,
b"\x50\xa2\x08\x02\x04\x44\x3a\xbe\x7e\x94\xc3\x98\x51\x96\xbe\xae\x5d\x54\x8c\x72\x7b\x04\x4d\xda\x51\x51\xe6\x0d\x7c\xd7\x6a\x9f\xd9\x31\xd0\x0e",
b"\x08HMAC-MD5\x07SIG-ALG\x03REG\x03INT\x00\x00\x00\x51\x8f\xed\x8c\x00\x3c\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86\x30\x39\x00\x00\x00\x00",
);
check(types::TSIG,
"HMAC-MD5.SIG-ALG.REG.INT. 1368386956 60 16 TkbpD66/Mtgo8GUEFZIwhg== 12345 18 16 TkbpD66/Mtgo8GUEFZIwhg==",
None,
b"\x08HMAC-MD5\x07SIG-ALG\x03REG\x03INT\x00\x00\x00\x51\x8f\xed\x8c\x00\x3c\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86\x30\x39\x00\x12\x00\x10\x4e\x46\xe9\x0f\xae\xbf\x32\xd8\x28\xf0\x65\x04\x15\x92\x30\x86",
);
}
@ -791,6 +782,15 @@ fn test_CAA() {
);
}
#[test]
fn test_DLV() {
check(types::DLV,
"20642 8 2 04443abe7e94c3985196beae5d548c727b044dda5151e60d7cd76a9fd931d00e",
None,
b"\x50\xa2\x08\x02\x04\x44\x3a\xbe\x7e\x94\xc3\x98\x51\x96\xbe\xae\x5d\x54\x8c\x72\x7b\x04\x4d\xda\x51\x51\xe6\x0d\x7c\xd7\x6a\x9f\xd9\x31\xd0\x0e",
);
}
#[test]
fn test_TYPE65226() {
let d1 = text::parse_with("\\# 3 414243", |data| {

Loading…
Cancel
Save