Skip to content

Commit

Permalink
Many small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalxo committed Aug 14, 2024
1 parent b969fdd commit e56e3db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,5 @@ public interface ArtemisConstants {
String LOG_AUDIT_CREATE_QUEUE_PATTERN = ".* AMQ601065: User %s\\(%s\\).*is creating a queue on target resource:.*with parameters.* name=myQueue.*address=myAddress.*";
String LOG_AUDIT_SENT_MESSAGE_PATTERN = ".* AMQ601500: User %s\\(%s\\)@.* sent a message .* address=%s::%s.*";
String LOG_AUDIT_RECEIVED_MESSAGE_PATTERN = ".* AMQ601501: User %s\\(%s\\)@.* is consuming a message from %s.*";
String AUTO_RELOAD_PROPERTY = "acceptorConfigurations.%s.params.sslAutoReload=true";
}
8 changes: 0 additions & 8 deletions common/src/main/java/io/brokerqe/claire/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public interface Constants {
String IMAGE_SYSTEMTEST_CLI_CPP = "quay.io/messaging/cli-cpp:latest";
String IMAGE_SYSTEMTEST_CLI_PROTON_PYTHON = "quay.io/messaging/cli-proton-python:latest";
String IMAGE_SYSTEMTEST_CLI_RHEA = "quay.io/messaging/cli-rhea:latest";
String IMAGE_MQTT_CLIENT = "quay.io/rhmessagingqe/hivemq-mqtt-cli";
// String IMAGE_OPENLDAP = "docker.io/bitnami/openldap:latest";
// To be mirrored!
String IMAGE_OPENLDAP = "docker.io/bitnami/openldap:2.6.7";
Expand All @@ -173,8 +172,6 @@ public interface Constants {

// Openshift related
String MONITORING_NAMESPACE = "openshift-monitoring";
String CERT_MANAGER_NAMESPACE = "cert-manager";

String MONITORING_NAMESPACE_USER = "openshift-user-workload-monitoring";
String PROMETHEUS_USER_SS = "prometheus-user-workload";
String THANOS_USER_SS = "thanos-ruler-user-workload";
Expand All @@ -185,14 +182,9 @@ public interface Constants {
String MARIADB_DRIVER_URL = "https://dlm.mariadb.com/2912798/Connectors/java/connector-java-3.1.4/mariadb-java-client-3.1.4.jar";
String MSSQL_DRIVER_URL = "https://download.microsoft.com/download/a/9/1/a91534b0-ed8c-4501-b491-e1dd0a20335a/sqljdbc_12.2.0.0_enu.zip";
String ORACLE_DRIVER_URL = "https://download.oracle.com/otn-pub/otn_software/jdbc/2110/ojdbc11.jar";
//CHECKSTYLE:OFF
enum SECRETSOURCE {
CERT_MANAGER,
TRUST_MANAGER,
MANUAL
}

//CHECKSTYLE:ON

String AUTO_RELOAD_PROPERTY = "acceptorConfigurations.%s.params.sslAutoReload=true";
}
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ public void waitUntilPodCondition(String namespaceName, Pod pod, Predicate<Pod>
client.pods().inNamespace(namespaceName).resource(pod).waitUntilCondition(condition, 3, TimeUnit.MINUTES);
}


public void waitUntilPodIsDeleted(String namespaceName, Pod pod) {
TestUtils.waitFor("deletion of pod " + pod.getMetadata().getName(), Constants.DURATION_5_SECONDS, Constants.DURATION_3_MINUTES, () -> {
return getPod(namespaceName, pod.getMetadata().getName()) == null;
Expand Down Expand Up @@ -519,8 +518,6 @@ public HasMetadata createOperatorGroup(String namespaceName, String name, List<S
watchedNamespacesString = namespaceName;
}



String operatorGroupString = String.format("""
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.amq.broker.v1beta1.ActiveMQArtemisAddress;
import io.amq.broker.v1beta1.activemqartemisspec.Acceptors;
import io.brokerqe.claire.AbstractSystemTests;
import io.brokerqe.claire.ArtemisConstants;
import io.brokerqe.claire.ArtemisVersion;
import io.brokerqe.claire.Constants;
import io.brokerqe.claire.ResourceManager;
Expand Down Expand Up @@ -170,6 +171,7 @@ public void testWithoutClientAuthentication(Constants.SECRETSOURCE source) {
doTestTlsMessaging(true, source, false);
}

@Test
@TestValidSince(ArtemisVersion.VERSION_2_21)
@TestValidUntil(ArtemisVersion.VERSION_2_33)
public void testSslManual() {
Expand Down Expand Up @@ -263,6 +265,7 @@ public void doTestTlsMessaging(boolean singleSecret, Constants.SECRETSOURCE sour

Map<String, KeyStoreData> keystores = new HashMap<>();
if (source == Constants.SECRETSOURCE.MANUAL) {
// keystores = CertificateManager.reuseDefaultGeneratedKeystoresFromFiles(); // kept for future debugging purposes
keystores = CertificateManager.generateDefaultCertificateKeystores(
ResourceManager.generateDefaultBrokerDN(),
ResourceManager.generateDefaultClientDN(),
Expand All @@ -279,8 +282,8 @@ public void doTestTlsMessaging(boolean singleSecret, Constants.SECRETSOURCE sour
getClient().createSecretEncodedData(testNamespace, clientSecretName, CertificateManager.createClientKeystoreSecret(keystores));
} else {
//acceptorConfigurations.new-acceptor.params.sslAutoReload=true
List<String> autoReload = List.of(String.format(Constants.AUTO_RELOAD_PROPERTY, amqpAcceptorName),
String.format(Constants.AUTO_RELOAD_PROPERTY, owireAcceptorName));
List<String> autoReload = List.of(String.format(ArtemisConstants.AUTO_RELOAD_PROPERTY, amqpAcceptorName),
String.format(ArtemisConstants.AUTO_RELOAD_PROPERTY, owireAcceptorName));

broker.getSpec().setBrokerProperties(autoReload);
String brokerName = broker.getMetadata().getName();
Expand Down

0 comments on commit e56e3db

Please sign in to comment.