@@ -89,6 +89,22 @@ impl TestContextManager {
89
89
. await
90
90
}
91
91
92
+ pub async fn dom ( & mut self ) -> TestContext {
93
+ TestContext :: builder ( )
94
+ . configure_dom ( )
95
+ . with_log_sink ( self . log_sink . clone ( ) )
96
+ . build ( )
97
+ . await
98
+ }
99
+
100
+ pub async fn elena ( & mut self ) -> TestContext {
101
+ TestContext :: builder ( )
102
+ . configure_elena ( )
103
+ . with_log_sink ( self . log_sink . clone ( ) )
104
+ . build ( )
105
+ . await
106
+ }
107
+
92
108
pub async fn fiona ( & mut self ) -> TestContext {
93
109
TestContext :: builder ( )
94
110
. configure_fiona ( )
@@ -249,11 +265,25 @@ impl TestContextBuilder {
249
265
250
266
/// Configures as charlie@example.net with fixed secret key.
251
267
///
252
- /// This is a shortcut for `.with_key_pair(fiona_keypair ())`.
268
+ /// This is a shortcut for `.with_key_pair(charlie_keypair ())`.
253
269
pub fn configure_charlie ( self ) -> Self {
254
270
self . with_key_pair ( charlie_keypair ( ) )
255
271
}
256
272
273
+ /// Configures as dom@example.net with fixed secret key.
274
+ ///
275
+ /// This is a shortcut for `.with_key_pair(dom_keypair())`.
276
+ pub fn configure_dom ( self ) -> Self {
277
+ self . with_key_pair ( dom_keypair ( ) )
278
+ }
279
+
280
+ /// Configures as elena@example.net with fixed secret key.
281
+ ///
282
+ /// This is a shortcut for `.with_key_pair(elena_keypair())`.
283
+ pub fn configure_elena ( self ) -> Self {
284
+ self . with_key_pair ( elena_keypair ( ) )
285
+ }
286
+
257
287
/// Configures as fiona@example.net with fixed secret key.
258
288
///
259
289
/// This is a shortcut for `.with_key_pair(fiona_keypair())`.
@@ -1148,6 +1178,32 @@ pub fn charlie_keypair() -> KeyPair {
1148
1178
KeyPair { public, secret }
1149
1179
}
1150
1180
1181
+ /// Load a pre-generated keypair for dom@example.net from disk.
1182
+ ///
1183
+ /// Like [alice_keypair] but a different key and identity.
1184
+ pub fn dom_keypair ( ) -> KeyPair {
1185
+ let public = key:: SignedPublicKey :: from_asc ( include_str ! ( "../test-data/key/dom-public.asc" ) )
1186
+ . unwrap ( )
1187
+ . 0 ;
1188
+ let secret = key:: SignedSecretKey :: from_asc ( include_str ! ( "../test-data/key/dom-secret.asc" ) )
1189
+ . unwrap ( )
1190
+ . 0 ;
1191
+ KeyPair { public, secret }
1192
+ }
1193
+
1194
+ /// Load a pre-generated keypair for elena@example.net from disk.
1195
+ ///
1196
+ /// Like [alice_keypair] but a different key and identity.
1197
+ pub fn elena_keypair ( ) -> KeyPair {
1198
+ let public = key:: SignedPublicKey :: from_asc ( include_str ! ( "../test-data/key/elena-public.asc" ) )
1199
+ . unwrap ( )
1200
+ . 0 ;
1201
+ let secret = key:: SignedSecretKey :: from_asc ( include_str ! ( "../test-data/key/elena-secret.asc" ) )
1202
+ . unwrap ( )
1203
+ . 0 ;
1204
+ KeyPair { public, secret }
1205
+ }
1206
+
1151
1207
/// Load a pre-generated keypair for fiona@example.net from disk.
1152
1208
///
1153
1209
/// Like [alice_keypair] but a different key and identity.
0 commit comments