From 6837e57de2bc5b69e118d8509b783997909563e8 Mon Sep 17 00:00:00 2001 From: John Boyes Date: Tue, 7 Jul 2020 15:20:11 +0700 Subject: [PATCH] Use JSON simulated GitHub responses, not gzip 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] https://github.com/SpectoLabs/hoverfly/issues/787 --- testdata/github_api.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/testdata/github_api.json b/testdata/github_api.json index 82f6edd3..7543fcff 100644 --- a/testdata/github_api.json +++ b/testdata/github_api.json @@ -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": [ "*" @@ -49,7 +49,7 @@ "no-cache" ], "Content-Encoding": [ - "gzip" + "identity" ], "Content-Security-Policy": [ "default-src 'none'" @@ -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": [ "*" @@ -161,7 +161,7 @@ "no-cache" ], "Content-Encoding": [ - "gzip" + "identity" ], "Content-Security-Policy": [ "default-src 'none'" @@ -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": [ "*" @@ -273,7 +273,7 @@ "no-cache" ], "Content-Encoding": [ - "gzip" + "identity" ], "Content-Security-Policy": [ "default-src 'none'" @@ -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": [ "*" @@ -385,7 +385,7 @@ "no-cache" ], "Content-Encoding": [ - "gzip" + "identity" ], "Content-Security-Policy": [ "default-src 'none'"