Skip to content

Commit

Permalink
Remove main classpath from systemTest source set.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBrand authored and LukasHiveMQ committed Mar 2, 2023
1 parent 40594df commit 6560df9
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CipherSuitesTlsST {
@SuppressWarnings("JUnitMalformedDeclaration")
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.withCipherSuites(CipherSuite.getAllAsString())
.withTlsEnabled(true)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PublishConnectMTlsST {
@SuppressWarnings("JUnitMalformedDeclaration")
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.withClientAuthentication(true)
.withTlsEnabled(true)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PublishConnectTlsST {
@SuppressWarnings("JUnitMalformedDeclaration")
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.withCipherSuites(CipherSuite.getAllAsString())
.withTlsEnabled(true)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SubscribeConnectMTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.withClientAuthentication(true)
.build())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SubscribeConnectTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.build())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TestBrokerConnectMTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.withClientAuthentication(true)
.build())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TestBrokerConnectTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.build())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ShellConnectMTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.build())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ShellConnectTlsST {
private final @NotNull HiveMQExtension hivemq = HiveMQExtension.builder()
.withTlsConfiguration(TlsConfiguration.builder()
.withTlsEnabled(true)
.withTlsVersions(List.of(TlsVersion.TLS_1_2, TlsVersion.TLS_1_3))
.withTlsVersions(TlsVersion.supportedAsList())
.build())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ private int generatePort() throws IOException {
final String websocketsConfig = setupWebsockets();
//@formatter:off
return "<hivemq>\n" + " " +
" <listeners>\n" + " " +
" <tcp-listener>\n" +
" <listeners>\n" + " " +
" <tcp-listener>\n" +
" <port>" + port + "</port>\n" +
" <bind-address>" + BIND_ADDRESS + "</bind-address>\n" +
" </tcp-listener>\n" +
Expand Down
16 changes: 12 additions & 4 deletions src/systemTest/java/com/hivemq/cli/utils/broker/TlsVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@

import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum TlsVersion {
TLS_1_3("TLSv1.3"),
TLS_1_2("TLSv1.2");
//TLS_1_1("TLSv1.1"),
//SSL_3_0("SSLv3"),
//TLS_1_0("TLSv1"),
//SSL_3_0("SSLv3");
//TLS_1_1("TLSv1.1"),
TLS_1_2("TLSv1.2"),
TLS_1_3("TLSv1.3");

private final @NotNull String tlsString;

Expand All @@ -35,4 +39,8 @@ public enum TlsVersion {
TlsVersion(final @NotNull String asString) {
tlsString = asString;
}

public static @NotNull List<TlsVersion> supportedAsList() {
return Arrays.stream(TlsVersion.values()).collect(Collectors.toList());
}
}

0 comments on commit 6560df9

Please sign in to comment.