Skip to content

Commit

Permalink
chore(rack3): Update approval specs for Rack3 format
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jan 23, 2025
1 parent 61639be commit 07e99db
Show file tree
Hide file tree
Showing 37 changed files with 152 additions and 42 deletions.
4 changes: 3 additions & 1 deletion DEVELOPER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ psql postgres://postgres:postgres@postgres/postgres

## Running the regression tests

The regression tests record a series of API requests/responses using a real exported database (not included in the git repository because of the size) and store the expectations in files using the Approvals gem. They allow you to make sure that the changes you have made have not made any (unexpected) changes to the interface.
The regression tests record a series of API requests/responses using a real exported database (not included in the
git repository because of the size) and store the expectations in files using the Approvals gem. They allow you to
make sure that the changes you have made have not made any (unexpected) changes to the interface.

The tests and files are stored in the [regression](regression) directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2071",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"name": "foo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, PUT, PATCH, DELETE, OPTIONS"
"access-control-allow-methods": "GET, PUT, PATCH, DELETE, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2133",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"name": "foo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2133",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"name": "foo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, OPTIONS"
"access-control-allow-methods": "POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1217",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"request": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, OPTIONS"
"access-control-allow-methods": "POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1109",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"request": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "text/plain;charset=utf-8",
"Vary": "Accept"
"content-type": "text/plain;charset=utf-8",
"vary": "Accept",
"content-length": "4",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": "logs"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, OPTIONS"
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "496",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_links": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, GET, OPTIONS"
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "913",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_embedded": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, OPTIONS"
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "287",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_embedded": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, OPTIONS"
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1146",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"uuid": "d2181b32-8b03-4daf-8cc0-d9168b2f6fac",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, PUT, DELETE, OPTIONS"
"access-control-allow-methods": "GET, PUT, DELETE, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "804",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"uuid": "d2181b32-8b03-4daf-8cc0-d9168b2f6fac",
Expand All @@ -44,7 +47,7 @@
"method": "POST",
"url": "https://example.org/example",
"headers": {
"Accept": "application/json"
"accept": "application/json"
},
"body": {
"pactUrl": "${pactbroker.pactUrl}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "296",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_links": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, GET, OPTIONS"
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "479",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_links": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, GET, OPTIONS"
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "296",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_links": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "POST, GET, OPTIONS"
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "427",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"_links": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
"access-control-allow-methods": "GET, POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
"response": {
"status": 201,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8",
"Location": "https://pact-broker/webhooks/dCGCl-Ba3PqEFJ_iE9mJkQ"
"content-type": "application/hal+json;charset=utf-8",
"location": "https://pact-broker/webhooks/dCGCl-Ba3PqEFJ_iE9mJkQ",
"content-length": "762",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"uuid": "dCGCl-Ba3PqEFJ_iE9mJkQ",
Expand All @@ -45,7 +48,7 @@
"method": "POST",
"url": "https://example.org/example",
"headers": {
"Accept": "application/json"
"accept": "application/json"
},
"body": {
"pactUrl": "${pactbroker.pactUrl}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Content-Type": "application/hal+json;charset=utf-8"
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1385",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
"summary": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Methods": "GET, OPTIONS"
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
}
Expand Down
Loading

0 comments on commit 07e99db

Please sign in to comment.