Skip to content

Commit 4d05b12

Browse files
committed
ensure jvm options array are covered by test and updated dev dependencies
1 parent a00cfcd commit 4d05b12

File tree

5 files changed

+677
-288
lines changed

5 files changed

+677
-288
lines changed

Gruntfile.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ module.exports = function (grunt) {
2828
},
2929
start_mockserver: {
3030
options: {
31-
serverPort: 1080
31+
serverPort: 1080,
32+
jvmOptions: [
33+
'-Dmockserver.enableCORSForAllResponses=true',
34+
'-Dmockserver.corsAllowMethods="CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH, TRACE"',
35+
'-Dmockserver.corsAllowHeaders="Allow, Content-Encoding, Content-Length, Content-Type, ETag, Expires, Last-Modified, Location, Server, Vary, Authorization"',
36+
'-Dmockserver.corsAllowCredentials=true -Dmockserver.corsMaxAgeInSeconds=300'
37+
],
38+
mockServerVersion: "5.13.2"
3239
}
3340
},
3441
stop_mockserver: {
@@ -87,7 +94,6 @@ module.exports = function (grunt) {
8794

8895
grunt.loadNpmTasks('grunt-exec');
8996
grunt.loadNpmTasks('grunt-contrib-jshint');
90-
grunt.loadNpmTasks('grunt-contrib-clean');
9197
grunt.loadNpmTasks('grunt-contrib-nodeunit');
9298

9399
grunt.registerTask('test', [

examples/client_examples/server.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@ function runMockServer() {
22
var mockserver = require('mockserver-node');
33

44
mockserver
5-
.start_mockserver({serverPort: 1080, verbose: true})
5+
.start_mockserver({
6+
serverPort: 1080,
7+
jvmOptions: [
8+
'-Dmockserver.enableCORSForAllResponses=true',
9+
'-Dmockserver.corsAllowMethods="CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH, TRACE"',
10+
'-Dmockserver.corsAllowHeaders="Allow, Content-Encoding, Content-Length, Content-Type, ETag, Expires, Last-Modified, Location, Server, Vary, Authorization"',
11+
'-Dmockserver.corsAllowCredentials=true -Dmockserver.corsMaxAgeInSeconds=300'
12+
],
13+
mockServerVersion: "5.13.2",
14+
verbose: true
15+
})
616
.then(
717
function () {
818
console.log("started MockServer");

examples/run_mockserver/server.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
var mockserver = require('mockserver-node');
22

33
mockserver
4-
.start_mockserver({serverPort: 1080, verbose: true})
4+
.start_mockserver({
5+
serverPort: 1080,
6+
jvmOptions: [
7+
'-Dmockserver.enableCORSForAllResponses=true',
8+
'-Dmockserver.corsAllowMethods="CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH, TRACE"',
9+
'-Dmockserver.corsAllowHeaders="Allow, Content-Encoding, Content-Length, Content-Type, ETag, Expires, Last-Modified, Location, Server, Vary, Authorization"',
10+
'-Dmockserver.corsAllowCredentials=true -Dmockserver.corsMaxAgeInSeconds=300'
11+
],
12+
mockServerVersion: "5.13.2",
13+
verbose: true
14+
})
515
.then(
616
function () {
717
console.log("started MockServer");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy