File tree Expand file tree Collapse file tree 3 files changed +42
-7
lines changed
test/integration-tests/src/test/java/org/wiremock/docker/it Expand file tree Collapse file tree 3 files changed +42
-7
lines changed Original file line number Diff line number Diff line change 44
55# Set `java` command if needed
66if [ " $1 " = " " -o " ${1# -} " != " $1 " ]; then
7- set -- java $JAVA_OPTS -cp /var/wiremock/lib/* :/var/wiremock/extensions/* wiremock.Run " $@ "
7+ set -- java $JAVA_OPTS -cp /var/wiremock/lib/* :/var/wiremock/extensions/* wiremock.Run " $@ " $WIREMOCK_OPTIONS
88fi
99
1010# allow the container to be started with `-e uid=`
1111if [ " $uid " != " " ]; then
1212 # Change the ownership of /home/wiremock to $uid
1313 chown -R $uid :$uid /home/wiremock
1414
15- set -- su-exec $uid :$uid " $@ "
15+ set -- su-exec $uid :$uid " $@ " $WIREMOCK_OPTIONS
1616fi
1717
18- exec " $@ "
18+ exec " $@ " $WIREMOCK_OPTIONS
Original file line number Diff line number Diff line change 44
55# Set `java` command if needed
66if [ " $1 " = " " -o " ${1: 0: 1} " = " -" ]; then
7- set -- java $JAVA_OPTS -cp /var/wiremock/lib/* :/var/wiremock/extensions/* wiremock.Run " $@ "
7+ set -- java $JAVA_OPTS -cp /var/wiremock/lib/* :/var/wiremock/extensions/* wiremock.Run " $@ " $WIREMOCK_OPTIONS
88fi
99
1010# allow the container to be started with `-e uid=`
1111if [ " $uid " != " " ]; then
1212 # Change the ownership of /home/wiremock to $uid
1313 chown -R $uid :$uid /home/wiremock
14-
15- set -- gosu $uid :$uid " $@ "
14+ set -- gosu $uid :$uid " $@ " $WIREMOCK_OPTIONS
1615fi
1716
18- exec " $@ "
17+ exec " $@ " $WIREMOCK_OPTIONS
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2023 WireMock Inc, Oleg Nenashev and all project contributors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package org .wiremock .docker .it ;
17+
18+ import org .junit .jupiter .api .Test ;
19+ import org .testcontainers .junit .jupiter .Container ;
20+ import org .testcontainers .junit .jupiter .Testcontainers ;
21+
22+ import org .wiremock .integrations .testcontainers .WireMockContainer ;
23+ import static org .junit .jupiter .api .Assertions .assertTrue ;
24+
25+ @ Testcontainers
26+ class WireMockOptionsTest {
27+
28+ @ Container
29+ public WireMockContainer wiremockServer = new WireMockContainer (TestConfig .WIREMOCK_IMAGE )
30+ .withEnv ("WIREMOCK_OPTIONS" , "--verbose" );
31+
32+ @ Test
33+ public void checkVerboseEnablingLogLine () {
34+ assertTrue (wiremockServer .getLogs ().contains ("Verbose logging enabled" ));
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments