Skip to content

Commit

Permalink
Use JSON simulated GitHub responses, not gzip
Browse files Browse the repository at this point in the history
The original captured GitHub API responses were gzip encoded, which made
them unreadable (without manually decoding them).

There is a feature request to have Hoverfly to do this translation
automatically when exporting captured simulations, but it is not
available yet[1].

So this commit has manually placed the decoded JSON in the simulated
responses.

[1] SpectoLabs/hoverfly#787
  • Loading branch information
johnboyes committed Jul 16, 2020
1 parent 81ee842 commit 6837e57
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions testdata/github_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"response": {
"status": 200,
"body": "H4sIAAAAAAAAA6tWSkksSVSyqlYqSi3IL84syS+qBPEKSnNyglILS1OLS0DcnMSk1JxiECsvPyUVyIiOrQUBABUCAvE/AAAA",
"encodedBody": true,
"body": "{\"data\":{\"repository\":{\"pullRequest\":{\"labels\":{\"nodes\":[]}}}}}",
"encodedBody": false,
"headers": {
"Access-Control-Allow-Origin": [
"*"
Expand All @@ -49,7 +49,7 @@
"no-cache"
],
"Content-Encoding": [
"gzip"
"identity"
],
"Content-Security-Policy": [
"default-src 'none'"
Expand Down Expand Up @@ -148,8 +148,8 @@
},
"response": {
"status": 200,
"body": "H4sIAAAAAAAAAxXHMQ7AIAhA0btwDI/RtelAI4MJigIOjfHulT+9vyCjI6QFSl2suOgX1yfzRWOSeSzjS2yhJpkO7iOsBAlqaaKwnx39lLu4dU8AAAA=",
"encodedBody": true,
"body": "{\"data\":{\"repository\":{\"pullRequest\":{\"labels\":{\"nodes\":[{\"name\":\"minor\"}]}}}}}",
"encodedBody": false,
"headers": {
"Access-Control-Allow-Origin": [
"*"
Expand All @@ -161,7 +161,7 @@
"no-cache"
],
"Content-Encoding": [
"gzip"
"identity"
],
"Content-Security-Policy": [
"default-src 'none'"
Expand Down Expand Up @@ -260,8 +260,8 @@
},
"response": {
"status": 200,
"body": "H4sIAAAAAAAAA6tWSkksSVSyqlYqSi3IL84syS+qBPEKSnNyglILS1OLS0DcnMSk1JxiECsvPyUVyIgGshJzU5WslHIz8/KLlGp14AIFiSXJGUq1sbUgAAANI+uxYAAAAA==",
"encodedBody": true,
"body": "{\"data\":{\"repository\":{\"pullRequest\":{\"labels\":{\"nodes\":[{\"name\":\"minor\"},{\"name\":\"patch\"}]}}}}}",
"encodedBody": false,
"headers": {
"Access-Control-Allow-Origin": [
"*"
Expand All @@ -273,7 +273,7 @@
"no-cache"
],
"Content-Encoding": [
"gzip"
"identity"
],
"Content-Security-Policy": [
"default-src 'none'"
Expand Down Expand Up @@ -372,8 +372,8 @@
},
"response": {
"status": 200,
"body": "H4sIAAAAAAAAA1WIMQ6AIAwA/9LZF/AMV+NQpYmYShHKYAh/l07Gm+6ugUdFcA0yJSlBJT9WqTLPdFcqasm4ERezKJ6GLMPwInBw4SkZ+vSNEP8joe4H9LUbLyUQYixxAAAA",
"encodedBody": true,
"body": "{\"data\":{\"repository\":{\"pullRequest\":{\"labels\":{\"nodes\":[{\"name\":\"major\"},{\"name\":\"minor\"},{\"name\":\"patch\"}]}}}}}",
"encodedBody": false,
"headers": {
"Access-Control-Allow-Origin": [
"*"
Expand All @@ -385,7 +385,7 @@
"no-cache"
],
"Content-Encoding": [
"gzip"
"identity"
],
"Content-Security-Policy": [
"default-src 'none'"
Expand Down

0 comments on commit 6837e57

Please sign in to comment.