Skip to content

Commit

Permalink
Improve test data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Bruijnzeels committed Nov 29, 2023
1 parent da81cb2 commit 6d19ca1
Show file tree
Hide file tree
Showing 377 changed files with 5,900 additions and 4,205 deletions.
8 changes: 4 additions & 4 deletions src/upgrades/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,15 +1114,15 @@ mod tests {
fn prepare_then_upgrade_0_10_3() {
test_upgrade(
"test-resources/migrations/v0_10_3/",
&["ca_objects", "cas", "pubd", "pubd_objects"],
&["ca_objects", "cas", "pubd", "pubd_objects", "signers", "status"],
);
}

#[test]
fn prepare_then_upgrade_0_11_0() {
test_upgrade(
"test-resources/migrations/v0_11_0/",
&["ca_objects", "cas", "pubd", "pubd_objects"],
&["ca_objects", "cas", "pubd", "pubd_objects", "signers", "status"],
);
}

Expand All @@ -1138,15 +1138,15 @@ mod tests {
fn prepare_then_upgrade_0_12_3() {
test_upgrade(
"test-resources/migrations/v0_12_3/",
&["ca_objects", "cas", "pubd", "pubd_objects"],
&["ca_objects", "cas", "pubd", "pubd_objects", "signers", "status"],
);
}

#[test]
fn prepare_then_upgrade_0_13_1() {
test_upgrade(
"test-resources/migrations/v0_13_1/",
&["ca_objects", "cas", "keys", "pubd", "pubd_objects", "signers", "status"],
&["ca_objects", "cas", "pubd", "pubd_objects", "signers", "status"],
);
}

Expand Down
6 changes: 6 additions & 0 deletions test-resources/migrations/test-setup/parent-res.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<parent_response xmlns="http://www.hactrn.net/uris/rpki/rpki-setup/" version="1" parent_handle="testbed" child_handle="krill-upgrade-test" service_uri="https://testbed.krill.cloud/rfc6492/testbed">
<parent_bpki_ta>
MIIDEzCCAfugAwIBAgIBATANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQDEyhBMUE0ODgwQjc3Q0Q1OTEyNENBNDk2MzcyMTQ5NzVGMkJBRTkyRjk1MB4XDTIzMDQyNjEzMzI1MVoXDTM4MDQyNjEzMzc1MVowMzExMC8GA1UEAxMoQTFBNDg4MEI3N0NENTkxMjRDQTQ5NjM3MjE0OTc1RjJCQUU5MkY5NTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOphFCow1kYB5as6wkdDqoPSBFhAe+csz8hGQ1SCIg8IvdQ2OhUFOxKfQ8EhoCABfDj08O+1JSYRT4JHR9I7fLmlN90PJmdkzVN1rauxLuyhCk0PsjNKPt2zVxKSK0/6QhwKidFfmpPS19gAtT8ioZRlpIGLe/JIBys8y/bLCGlDWM6R+Dgg7fUIjxolui9VOo2ryZyOWuXnBn8m8XrqBzgIOd26S59c28+nw2qa9O2XQg9tfEp3rJxkJ+2qUQ5SErDfHkwQbEJMPYTdTQFKWWmerHFQIWm8F3MJVqZKu8ZH+N9zAimxGoSsM6u6PwYQXWbU5f0sUUIGC9PvK5UDuKcCAwEAAaMyMDAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUoaSIC3fNWRJMpJY3IUl18rrpL5UwDQYJKoZIhvcNAQELBQADggEBAAsS0FwEIC+ZvL8Te588c4twPTG93I0vopaE4vR6gwD1YHPCftjEmZ1y9Tx/nk3jL3lgnNSSXbkHV31jcljz8f1RmgkXvOR0SGr/YFXAxuqhroJUm3j6pre/K/7BIhMwbcl/ckNL/7h/fQI5rQs2nt1sKB6CxTIhYPNTUF2JO9Gs5PBGJSyiVXm0E28SQ7nzMfUDqa+kAd/+0y0z6OJwpg3k2K9OVkx3PZxZ6wxkboNbqsSvEKaf2kAKNOpBnPw/MN98rRy5Jfi2e/fx0J1MpD2LkaoZZC23DlNwdu6jXkqWnbNLBxtRqlU2NbaAbhnYTEkOX9dIwlh+Ld+72S7wfGk=
</parent_bpki_ta>
</parent_response>

Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Perconfigure CLI:
Some pointers on how to set up a Krill CA under testbed.krill.cloud
and generate some history for use in migration tests.

Pre-configure CLI:

export KRILL_CLI_MY_CA="krill-upgrade-test"
export KRILL_CLI_TOKEN=03e3ce77ebc2bf14753ee4783d1ceffb
Expand Down
5 changes: 5 additions & 0 deletions test-resources/migrations/test-setup/repo-response.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<repository_response xmlns="http://www.hactrn.net/uris/rpki/rpki-setup/" version="1" publisher_handle="krill-upgrade-test" service_uri="https://testbed.krill.cloud/rfc8181/krill-upgrade-test/" sia_base="rsync://testbed.krill.cloud/repo/krill-upgrade-test/" rrdp_notification_uri="https://testbed.krill.cloud/rrdp/notification.xml">
<repository_bpki_ta>
MIIDEzCCAfugAwIBAgIBATANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQDEygzNEEyQTBGNjBFQzRFRDRFNDhFMUE4RTc0OUNENkM3QThGMEQyMjAwMB4XDTIzMDQyNjEzMzI0OFoXDTM4MDQyNjEzMzc0OFowMzExMC8GA1UEAxMoMzRBMkEwRjYwRUM0RUQ0RTQ4RTFBOEU3NDlDRDZDN0E4RjBEMjIwMDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALeduzj2SPpHWzepp52z/Wo0T48U6NQNBZiYldWxI8335GNWfCrRYjPJ+tt9NccgmAWwww8y0lR/7UFLNfSF1uV+NHhIZqyDOXlFjok9TwR2UN3Qu2yzamgRVFqlemTVFwqliIr6ov+EmXB5ncjnDnslpTu88eLTIczwhTLO/u+/wfTqq89A9gUfJQdBOznZkwwEVLiBv0Iv2gaCHO1osTI326LWhaZaP5x9E/iLnx0qq9Y4e1uzPKLk98mLZMBHFkO0FQVChHjWliLWwWYjTgJZGf2578WmedV7C9mWSOLFv6f+Ytxzr4mpVPKq7N4JVTRrUb63DVu/D1pQRFG2UuUCAwEAAaMyMDAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUNKKg9g7E7U5I4ajnSc1seo8NIgAwDQYJKoZIhvcNAQELBQADggEBADz7F34aWdJeMTwLNBISEGRWGtEDtjfxkwGLSS+9u8YepyEtztHYQH/0129vDq8htfEeTyFV4Eekr28qLWASPigLRqx5lx3xVtNhAo/gE+eicIdf2FGxY8ruMbCjaEUGkz0K2S3jlVOBnbl70Pb30p/uLujG398JaAsnAARtHASnrJ3Aaup4YqYQxRBoIeA3x/zhv38NSBZ/9UTBjdLhkK+EwhPhPwMvxsWNRLApTeSl/8xu73rOKQV98D9WyEcxBffhnwzBgY2xNKdp1jFiy1wNpvhEnY/s5V84tns7S2xSKZY3GoqM7ZW5Px1ZGDAM7ntXow0DtsXOybSg2BO8PMs=
</repository_bpki_ta>
</repository_response>
101 changes: 101 additions & 0 deletions test-resources/migrations/v0_10_3/ca_objects/krill-upgrade-test.json

Large diffs are not rendered by default.

155 changes: 0 additions & 155 deletions test-resources/migrations/v0_10_3/ca_objects/testbed-client.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"actor": "admin-token",
"time": "2023-10-19T08:19:47.707453175Z",
"handle": "testbed-client",
"time": "2023-11-29T11:44:11.548397574Z",
"handle": "krill-upgrade-test",
"version": 1,
"sequence": 1,
"details": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"actor": "admin-token",
"time": "2023-10-19T08:20:03.545594564Z",
"handle": "testbed-client",
"time": "2023-11-29T11:44:55.841650123Z",
"handle": "krill-upgrade-test",
"version": 2,
"sequence": 2,
"details": {
"type": "repo_update",
"service_uri": "https://testbed.krill.cloud/rfc8181/testbed-client/"
"service_uri": "https://testbed.krill.cloud/rfc8181/krill-upgrade-test/"
},
"effect": {
"result": "success",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"actor": "krill",
"time": "2023-10-19T08:20:04.680568334Z",
"handle": "testbed-client",
"time": "2023-11-29T11:44:56.825572726Z",
"handle": "krill-upgrade-test",
"version": 3,
"sequence": 3,
"details": {
Expand All @@ -11,9 +11,9 @@
{
"resource_class_name": "0",
"resources": {
"asn": "AS204325, AS211321",
"ipv4": "185.49.140.0/22",
"ipv6": "2a04:b900::/29"
"asn": "AS65000-AS65005",
"ipv4": "192.168.0.0/16",
"ipv6": "2001:db8::/32"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"actor": "krill",
"time": "2023-10-19T08:20:06.717504859Z",
"handle": "testbed-client",
"time": "2023-11-29T11:44:59.623460916Z",
"handle": "krill-upgrade-test",
"version": 5,
"sequence": 4,
"details": {
"type": "update_rcvd_cert",
"resource_class_name": "0",
"resources": {
"asn": "AS204325, AS211321",
"ipv4": "185.49.140.0/22",
"ipv6": "2a04:b900::/29"
"asn": "AS65000-AS65005",
"ipv4": "192.168.0.0/16",
"ipv6": "2001:db8::/32"
}
},
"effect": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:08.400500702Z",
"handle": "krill-upgrade-test",
"version": 6,
"sequence": 5,
"details": {
"type": "roa_definition_updates",
"updates": {
"added": [
{
"asn": 64496,
"prefix": "192.168.0.0/16"
}
],
"removed": []
}
},
"effect": {
"result": "success",
"events": [
6,
7
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:08.582443995Z",
"handle": "krill-upgrade-test",
"version": 8,
"sequence": 6,
"details": {
"type": "roa_definition_updates",
"updates": {
"added": [
{
"asn": 64496,
"prefix": "2001:db8::/64"
}
],
"removed": []
}
},
"effect": {
"result": "success",
"events": [
8,
9
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:08.903173317Z",
"handle": "krill-upgrade-test",
"version": 10,
"sequence": 7,
"details": {
"type": "roa_definition_updates",
"updates": {
"added": [],
"removed": [
{
"asn": 64496,
"prefix": "192.168.0.0/16"
}
]
}
},
"effect": {
"result": "success",
"events": [
10,
11
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:08.978435249Z",
"handle": "krill-upgrade-test",
"version": 12,
"sequence": 8,
"details": {
"type": "roa_definition_updates",
"updates": {
"added": [
{
"asn": 64496,
"prefix": "192.168.0.0/24"
}
],
"removed": []
}
},
"effect": {
"result": "success",
"events": [
12,
13
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:09.368883590Z",
"handle": "krill-upgrade-test",
"version": 14,
"sequence": 9,
"details": {
"type": "roa_definition_updates",
"updates": {
"added": [
{
"asn": 0,
"prefix": "192.168.0.0/22"
}
],
"removed": []
}
},
"effect": {
"result": "success",
"events": [
14,
15
]
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"actor": "admin-token",
"time": "2023-10-19T08:31:21.961752867Z",
"handle": "testbed-client",
"time": "2023-11-29T11:45:23.854540486Z",
"handle": "krill-upgrade-test",
"version": 16,
"sequence": 7,
"sequence": 10,
"details": {
"type": "aspas_update",
"updates": {
"add_or_replace": [
{
"customer": 204325,
"customer": 65000,
"providers": [
"AS65000",
"AS65001"
"AS65001(v4)",
"AS65002(v6)",
"AS65003"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{
"actor": "admin-token",
"time": "2023-10-19T08:35:28.666963249Z",
"handle": "testbed-client",
"time": "2023-11-29T11:45:28.352146717Z",
"handle": "krill-upgrade-test",
"version": 18,
"sequence": 9,
"sequence": 11,
"details": {
"type": "aspas_update_existing",
"customer": 204325,
"customer": 65000,
"update": {
"added": [
"AS65002(v4)",
"AS65003(v6)"
],
"added": [],
"removed": [
"AS65001"
"AS65003"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:33.629499894Z",
"handle": "krill-upgrade-test",
"version": 20,
"sequence": 12,
"details": {
"type": "aspas_update",
"updates": {
"add_or_replace": [],
"remove": [
65000
]
}
},
"effect": {
"result": "success",
"events": [
20,
21
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:38.232494730Z",
"handle": "krill-upgrade-test",
"version": 22,
"sequence": 13,
"details": {
"type": "aspas_update",
"updates": {
"add_or_replace": [
{
"customer": 65000,
"providers": [
"AS65001(v4)",
"AS65002(v6)",
"AS65003"
]
}
],
"remove": []
}
},
"effect": {
"result": "success",
"events": [
22,
23
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"actor": "admin-token",
"time": "2023-11-29T11:45:44.966319540Z",
"handle": "krill-upgrade-test",
"version": 24,
"sequence": 14,
"details": {
"type": "key_roll_initiate",
"older_than_seconds": 0
},
"effect": {
"result": "success",
"events": [
24,
25
]
}
}
Loading

0 comments on commit 6d19ca1

Please sign in to comment.