1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
use crate::*;
#[derive(
Debug, Clone, Serialize, Deserialize, Error, PartialEq, Eq, Hash, PartialOrd, Ord,
)]
pub enum PageExpectation {
#[error("ValidCode: {0}.")]
ValidCode(u32),
#[error("ValidNoContent.")]
ValidNoContent,
#[error("ValidContent: {0}.")]
ValidContent(String),
#[error("ValidLength: {0} bytes.")]
ValidLength(usize),
#[error("ValidNoLength.")]
ValidNoLength,
#[error("ValidAddress: {0}")]
ValidAddress(String),
#[error("ValidNoAddress.")]
ValidNoAddress,
}
pub type PageExpectations = Vec<PageExpectation>;
#[derive(
Debug, Copy, Clone, Serialize, Deserialize, Error, PartialEq, Eq, PartialOrd, Ord,
)]
pub enum DomainExpectation {
#[error("ValidExpiryPeriod: {0} days.")]
ValidExpiryPeriod(i32),
}
pub type DomainExpectations = Vec<DomainExpectation>;
#[derive(Debug, Clone, Serialize, Deserialize, Error, PartialEq, Eq, Hash)]
pub enum Expected {
#[error("URL: \"{0}\" returns expected final-address: \"{1}\".")]
Address(String, String),
#[error("URL: \"{0}\" returns expected error-code: {1}.")]
HttpCode(String, u32),
#[error("URL: \"{0}\" contains expected literal: \"{1}\".")]
Content(String, String),
#[error("URL: \"{0}\" no content-length validation.")]
NoContentLength(String),
#[error("URL: \"{0}\" no content validation.")]
EmptyContent(String),
#[error("URL: \"{0}\" has minimum content-length at least: {1} bytes long.")]
ContentLength(String, usize),
#[error(
"TLS certificate for domain: \"{0}\", will be valid for: {1} more days. Requested minimum: {2} days."
)]
TLSCertificateFresh(String, i32, i32),
}