mock-server / mockserver

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
http://mock-server.com
Apache License 2.0
4.62k stars 1.08k forks source link

Configruation ignored #1885

Open gschaden opened 4 months ago

gschaden commented 4 months ago

Describe the issue When using the docker container configuration for detailed match failures is ignored

What you are trying to do I tried to disable detailed match failures

MockServer version 5.15.0

To Reproduce

When running docker run --rm -it -e MOCKSERVER_DETAILED_MATCH_FAILURES=false -p 1080:1080 mockserver/mockserver:mockserver-5.15.0 match details are still shown. I also tried to map a mockserver.properties file to /config

Expected behaviour no details should be shown

MockServer Log

2024-07-12 15:07:10 5.15.0 INFO Reading properties from property file [/config/mockserver.properties]:
  mockserver.initializationJsonPath = /config/expectations/*.json
  mockserver.detailedMatchFailures = false

2024-07-12 15:07:10 5.15.0 INFO using environment variables:

  [
        SERVER_PORT=1080,
        MOCKSERVER_DETAILED_MATCH_FAILURES=false
  ]

 and system properties:

  [
        mockserver.propertyFile=/config/mockserver.properties
  ]

 and command line options:

  [

  ]

2024-07-12 15:07:10 5.15.0 INFO loading JSON initialization file:

  /config/expectations/1.json

2024-07-12 15:08:06 5.15.0 INFO 1080 request:

  {
    "method" : "GET",
    "path" : "/",
    "headers" : {
      "content-length" : [ "0" ],
      "User-Agent" : [ "curl/7.81.0" ],
      "Accept" : [ "*/*" ]
    },
    "keepAlive" : true,
    "secure" : false,
    "protocol" : "HTTP_1_1",
  }

 didn't match expectation:

  {
    "httpRequest" : {
      "method" : "POST",