Skip to content

Commit

Permalink
Merge pull request #3056 from yurake/3049-fix-third-party-code-assess…
Browse files Browse the repository at this point in the history
…ment

add %test.quarkus.jaeger.enabled=false #3049
  • Loading branch information
yurake authored Apr 5, 2023
2 parents 9fe594b + f1cc142 commit 52b033a
Show file tree
Hide file tree
Showing 38 changed files with 71 additions and 44 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/docker-image-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/nginx
args: --severity-threshold=high --file=kubernetes/nginx/Dockerfile
args: --severity-threshold=critical --file=kubernetes/nginx/Dockerfile
- name: rename sarif file
run: mv snyk.sarif nginx.sarif

Expand All @@ -100,7 +100,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/mysql
args: --severity-threshold=high --file=kubernetes/mysql/Dockerfile
args: --severity-threshold=critical --file=kubernetes/mysql/Dockerfile
- name: rename sarif file
run: mv snyk.sarif mysql.sarif

Expand All @@ -123,7 +123,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/postgres
args: --severity-threshold=high --file=kubernetes/postgres/Dockerfile
args: --severity-threshold=critical --file=kubernetes/postgres/Dockerfile
- name: rename sarif file
run: mv snyk.sarif postgres.sarif

Expand All @@ -146,7 +146,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/mongodb
args: --severity-threshold=high --file=kubernetes/mongodb/Dockerfile
args: --severity-threshold=critical --file=kubernetes/mongodb/Dockerfile
- name: rename sarif file
run: mv snyk.sarif mongodb.sarif

Expand All @@ -169,7 +169,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/cassandra
args: --severity-threshold=high --file=kubernetes/cassandra/Dockerfile
args: --severity-threshold=critical --file=kubernetes/cassandra/Dockerfile
- name: rename sarif file
run: mv snyk.sarif cassandra.sarif

Expand All @@ -192,7 +192,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/rabbitmq
args: --severity-threshold=high --file=kubernetes/rabbitmq/Dockerfile
args: --severity-threshold=critical --file=kubernetes/rabbitmq/Dockerfile
- name: rename sarif file
run: mv snyk.sarif rabbitmq.sarif

Expand All @@ -215,7 +215,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/jenkins
args: --severity-threshold=high --file=kubernetes/monitoring/jenkins/Dockerfile
args: --severity-threshold=critical --file=kubernetes/monitoring/jenkins/Dockerfile
- name: rename sarif file
run: mv snyk.sarif jenkins.sarif

Expand All @@ -238,7 +238,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/ab
args: --severity-threshold=high --file=kubernetes/monitoring/test/ab/Dockerfile
args: --severity-threshold=critical --file=kubernetes/monitoring/test/ab/Dockerfile
- name: rename sarif file
run: mv snyk.sarif ab.sarif

Expand All @@ -261,7 +261,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ secrets.DOCKERHUB_USER }}/postmannewman-quarkus
args: --severity-threshold=high --file=kubernetes/monitoring/test/postmannewman/quarkus/Dockerfile
args: --severity-threshold=critical --file=kubernetes/monitoring/test/postmannewman/quarkus/Dockerfile
- name: rename sarif file
run: mv snyk.sarif postmannewman-quarkus.sarif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static void stopReceived() {
ActiveMqSubscribeService.isEnableReceived = false;
}

@Override
public void run() {
while (isEnableReceived) {
try (JMSContext context = connectionFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-activemq-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ quarkus.jaeger.service-name=consumer-hazelcast-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ quarkus.jaeger.service-name=consumer-kafka-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-rabbitmq-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-redis-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ quarkus.jaeger.service-name=converter-kafka-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=converter-rabbitmq-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-activemq-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package webapp.tier.service.socket;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;

import java.net.URI;
import java.util.concurrent.LinkedBlockingDeque;
Expand All @@ -21,15 +21,15 @@
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
class ActiveMqSocketTestForQuarkus {
class ActiveMqSocketForQuarkusTest {

private static final LinkedBlockingDeque<String> MESSAGES = new LinkedBlockingDeque<>();

@TestHTTPResource("/quarkus/activemq/subscribe")
URI uri;

@Test
public void testOnMessage() throws Exception {
void testOnMessage() throws Exception {
try (Session session = ContainerProvider.getWebSocketContainer()
.connectToServer(Client.class, uri)) {
assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javax.websocket.Session;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import io.quarkus.test.junit.QuarkusTest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ quarkus.jaeger.service-name=jaxrs-cassandra-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ quarkus.jaeger.service-name=jaxrs-grpc-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%dev.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.enabled=false

# grpc
quarkus.grpc.clients.id.host=server-grpc-quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ quarkus.jaeger.service-name=jaxrs-hazelcast-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import org.eclipse.microprofile.health.HealthCheckResponse.Status;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import io.quarkus.test.junit.QuarkusTest;
import webapp.tier.service.HazelcastServiceStatus;
Expand All @@ -27,6 +26,7 @@ void testCallDown() {
@Test
void testCallUp() throws IOException, TimeoutException {
ReadinessHealthCheckHazelcast hc = new ReadinessHealthCheckHazelcast() {
@Override
protected HazelcastServiceStatus createHazelcastStatus() {
HazelcastServiceStatus mock = mock(HazelcastServiceStatus.class);
when(mock.isActive()).thenReturn(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package webapp.tier.service.socket;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;

import java.net.URI;
import java.util.concurrent.LinkedBlockingDeque;
Expand All @@ -21,15 +21,15 @@
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
class HazelcastSocketTestForQuarkus {
class HazelcastSocketForQuarkusTest {

private static final LinkedBlockingDeque<String> MESSAGES = new LinkedBlockingDeque<>();

@TestHTTPResource("/quarkus/hazelcast/subscribe")
URI uri;

@Test
public void testOmMessage() throws Exception {
void testOmMessage() throws Exception {
try (Session session = ContainerProvider.getWebSocketContainer()
.connectToServer(Client.class, uri)) {
assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javax.websocket.Session;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import io.quarkus.test.junit.QuarkusTest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ quarkus.jaeger.service-name=jaxrs-kafka-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-memcached-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import org.junit.jupiter.api.Test;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;

import com.whalin.MemCached.MemCachedClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-mongodb-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public class MysqlService implements Database {

public boolean connectionStatus() {
boolean status = false;
try (Connection con = ds.getConnection()) {
try {
ds.getConnection();
status = true;
} catch (SQLException | NullPointerException e) {
logger.log(Level.SEVERE, "Status Check Error.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-mysql-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class PostgresService implements Database {

public boolean connectionStatus() {
boolean status = false;
try (Connection con = ds.getConnection()) {
try {
ds.getConnection();
status = true;
} catch (SQLException | NullPointerException e) {
logger.log(Level.SEVERE, "Status Check Error.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-postgres-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ quarkus.log.category."io.quarkus".level=INFO

# Opentracing
quarkus.jaeger.service-name=jaxrs-rabbitmq-quarkus
%dev.quarkus.jaeger.service-name=localhost
%test.quarkus.jaeger.service-name=localhost
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package webapp.tier.service.socket;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;

import java.net.URI;
import java.util.concurrent.LinkedBlockingDeque;
Expand All @@ -21,15 +21,15 @@
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
class RabbitmqSocketTestForQuarkus {
class RabbitmqSocketForQuarkusTest {

private static final LinkedBlockingDeque<String> MESSAGES = new LinkedBlockingDeque<>();

@TestHTTPResource("/quarkus/rabbitmq/subscribe")
URI uri;

@Test
public void testOmMessage() throws Exception {
void testOmMessage() throws Exception {
try (Session session = ContainerProvider.getWebSocketContainer()
.connectToServer(Client.class, uri)) {
assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javax.websocket.Session;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import io.quarkus.test.junit.QuarkusTest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ quarkus.jaeger.service-name=jaxrs-redis-quarkus
quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.agent-host-port=jaeger-agent:6831
%dev.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.agent-host-port=localhost:6831
%test.quarkus.jaeger.enabled=false

# message
common.message=Hello k8s-3tier-webapp with quarkus
Expand Down
Loading

0 comments on commit 52b033a

Please sign in to comment.