diff --git a/examples/v3/todo-consumer/src/todo.js b/examples/v3/todo-consumer/src/todo.js index 5b10aa7e8..de4cd09cd 100644 --- a/examples/v3/todo-consumer/src/todo.js +++ b/examples/v3/todo-consumer/src/todo.js @@ -7,10 +7,6 @@ const parser = new XMLParser({ ignoreAttributes: false, }); let serverUrl = 'http://127.0.0.1:2203'; -const HasBinaryPayloadIssue = - process.platform === 'win32' || - (process.platform === 'darwin' && process.arch === 'arm64') || - (process.platform === 'linux' && process.arch === 'arm64'); module.exports = { getProjects: async (format = 'json') => { @@ -44,9 +40,7 @@ module.exports = { const data = fs.readFileSync(image); return axios.post(serverUrl + '/projects/' + id + '/images', data, { headers: { - 'Content-Type': HasBinaryPayloadIssue - ? 'application/octet-stream' - : 'image/jpeg', + 'Content-Type': 'image/jpeg', }, }); }, diff --git a/examples/v3/todo-consumer/test/consumer.spec.js b/examples/v3/todo-consumer/test/consumer.spec.js index 7e28e4a61..ce1b72e4c 100644 --- a/examples/v3/todo-consumer/test/consumer.spec.js +++ b/examples/v3/todo-consumer/test/consumer.spec.js @@ -8,10 +8,6 @@ const LOG_LEVEL = process.env.LOG_LEVEL || 'TRACE'; const TodoApp = require('../src/todo'); const expect = chai.expect; -const HasBinaryPayloadIssue = - process.platform === 'win32' || - (process.platform === 'darwin' && process.arch === 'arm64') || - (process.platform === 'linux' && process.arch === 'arm64'); chai.use(chaiAsPromised); describe('Pact V3', () => { @@ -148,7 +144,6 @@ describe('Pact V3', () => { }); }); - // See https://github.com/pact-foundation/pact-reference/issues/171 for why it's skipped describe('with image uploads', () => { before(() => { provider @@ -156,7 +151,7 @@ describe('Pact V3', () => { .uponReceiving('a request to store an image against the project') .withRequestBinaryFile( { method: 'POST', path: '/projects/1001/images' }, - HasBinaryPayloadIssue ? 'application/octet-stream' : 'image/jpeg', + 'image/jpeg', path.resolve(__dirname, 'example.jpg') ) .willRespondWith({ status: 201 });