Skip to content

Commit c3b9d6c

Browse files
authored
Merge pull request #1171 from pact-foundation/fix/pact_ref_issue-366
fix: revert test workaround / update to matt plugin 0.1.0
2 parents 38a360c + f306c2b commit c3b9d6c

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

examples/v4/plugins/provider.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ export const startTCPServer = (
1717
sock.on('data', (data) => {
1818
const msg = parseMattMessage(data.toString());
1919

20-
// if (msg === 'hellotcp') {
21-
// sock.write(generateMattMessage('tcpworld'));
22-
// Workaround for https://github.com/pact-foundation/pact-reference/issues/366
23-
const v12_decoded_msg = parseMattMessage(atob(msg));
24-
console.log('v12_decoded_msg', v12_decoded_msg);
25-
if (v12_decoded_msg === 'hellotcp') {
26-
sock.write(btoa(generateMattMessage('tcpworld')));
20+
if (msg === 'hellotcp') {
21+
sock.write(generateMattMessage('tcpworld'));
2722
} else {
2823
sock.write(generateMattMessage('message not understood'));
2924
}

examples/v4/plugins/test/matt.consumer.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const { expect } = chai;
3232
.uponReceiving('an HTTP request to /matt')
3333
.usingPlugin({
3434
plugin: 'matt',
35-
version: '0.0.9',
35+
version: '0.1.0',
3636
})
3737
.withRequest('POST', '/matt', (builder) => {
3838
builder.pluginContents('application/matt', mattRequest);
@@ -75,7 +75,7 @@ const { expect } = chai;
7575
.addSynchronousInteraction('a MATT message')
7676
.usingPlugin({
7777
plugin: 'matt',
78-
version: '0.0.9',
78+
version: '0.1.0',
7979
})
8080
.withPluginContents(mattMessage, 'application/matt')
8181
.startTransport('matt', HOST)

scripts/install-plugins.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [ ! -f ~/.pact/bin/pact-plugin-cli ]; then
5252
chmod +x ~/.pact/bin/pact-plugin-cli
5353
fi
5454

55-
if [ ! -d ~/.pact/plugins/matt-0.0.9 ]; then
55+
if [ ! -d ~/.pact/plugins/matt-0.1.0 ]; then
5656
echo "--- 🐿 Installing MATT plugin"
57-
~/.pact/bin/pact-plugin-cli install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9
57+
~/.pact/bin/pact-plugin-cli install https://github.com/you54f/pact-matt-plugin/releases/tag/v0.1.0
5858
fi

src/pact.integration.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('V4 Pact', () => {
8383
.uponReceiving('an HTTP request to /matt')
8484
.usingPlugin({
8585
plugin: 'matt',
86-
version: '0.0.9',
86+
version: '0.1.0',
8787
})
8888
.withRequest('POST', '/matt', (builder) => {
8989
builder.pluginContents('application/matt', mattRequest);
@@ -144,7 +144,7 @@ describe('V4 Pact', () => {
144144
.addSynchronousInteraction('a MATT message')
145145
.usingPlugin({
146146
plugin: 'matt',
147-
version: '0.0.9',
147+
version: '0.1.0',
148148
})
149149
.withPluginContents(mattMessage, 'application/matt')
150150
.startTransport('matt', HOST)

0 commit comments

Comments
 (0)