Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public void testOGNLBodyListAndMap() {
assertExpression("${body[0][code]}", 4321);
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testOGNLBodyEmptyList() {
Map<String, List<String>> map = new HashMap<>();
Expand Down Expand Up @@ -1325,7 +1325,7 @@ public void testBodyOGNLOrderListOutOfBoundsShorthand() {
assertTrue(cause2.getMessage().startsWith("Index 3 out of bounds for length 2"));
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLOrderListOutOfBoundsWithNullSafe() {
List<OrderLine> lines = new ArrayList<>();
Expand All @@ -1338,7 +1338,7 @@ public void testBodyOGNLOrderListOutOfBoundsWithNullSafe() {
assertExpression("${bodyAs(Order)?.getLines[3].getId}", null);
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLOrderListOutOfBoundsWithNullSafeShorthand() {
List<OrderLine> lines = new ArrayList<>();
Expand All @@ -1351,7 +1351,7 @@ public void testBodyOGNLOrderListOutOfBoundsWithNullSafeShorthand() {
assertExpression("${bodyAs(Order)?.lines[3].id}", null);
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLOrderListNoMethodNameWithNullSafe() {
List<OrderLine> lines = new ArrayList<>();
Expand All @@ -1367,7 +1367,7 @@ public void testBodyOGNLOrderListNoMethodNameWithNullSafe() {
assertEquals("getRating", cause.getMethodName());
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLOrderListNoMethodNameWithNullSafeShorthand() {
List<OrderLine> lines = new ArrayList<>();
Expand All @@ -1383,7 +1383,7 @@ public void testBodyOGNLOrderListNoMethodNameWithNullSafeShorthand() {
assertEquals("rating", cause.getMethodName());
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLNullSafeToAvoidNPE() {
Animal tiger = new Animal("Tony the Tiger", 13);
Expand All @@ -1409,7 +1409,7 @@ public void testBodyOGNLNullSafeToAvoidNPE() {
e.getMessage());
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOGNLNullSafeToAvoidNPEShorthand() {
Animal tiger = new Animal("Tony the Tiger", 13);
Expand Down Expand Up @@ -1528,7 +1528,7 @@ public void testBodyOgnlReplaceEscapedChar() {
assertExpression("${bodyAs(String).replace(\"$\", \"-\")}", "foo-bar-baz");
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOgnlReplaceEscapedBackslashChar() {
exchange.getIn().setBody("foo\\bar\\baz");
Expand All @@ -1547,7 +1547,7 @@ public void testBodyOgnlReplaceFirst() {
assertExpression("${bodyAs(String).replaceFirst(\"http:\",\" \")}", " camel.apache.org");
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testBodyOgnlReplaceSingleQuoteInDouble() {
exchange.getIn().setBody("Hello O\"Conner");
Expand Down Expand Up @@ -1940,7 +1940,7 @@ public void testBodyAsOneLine() {
assertExpression("Hi ${bodyOneLine} Again", "Hi HelloGreatWorld Again");
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testListIndexByNestedFunction() {
List<String> alist = new ArrayList<>();
Expand All @@ -1957,7 +1957,7 @@ public void testListIndexByNestedFunction() {
assertExpression(exp, "99");
}

@Disabled("Investigation pending - see CAMEL-19681")
@Disabled("csimple does not support null-safe OGNL, nested functions, or complex escaping")
@Test
public void testNestedFunction() {
exchange.getMessage().setBody("Tony");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

/**
* Test the ftps component over SSL (explicit) with client authentication
*/
@EnabledIf(value = "org.apache.camel.test.infra.ftp.services.embedded.FtpsUtil#hasRequiredAlgorithms")
public class FileToFtpsExplicitSSLWithClientAuthIT extends FtpsServerExplicitSSLWithClientAuthTestSupport {

protected String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ "&securityProtocol=SSLv3&implicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&securityProtocol=TLSv1.2&implicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected CamelContext createCamelContext() throws Exception {
tmp.setKeyStore(ksp);

SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setSecureSocketProtocol("SSLv3");
sslContextParameters.setSecureSocketProtocol("TLSv1.2");
sslContextParameters.setTrustManagers(tmp);
context.setSSLContextParameters(sslContextParameters);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public SSLContextParameters createSslContextParams() {
tmp.setKeyStore(ksp);

SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setSecureSocketProtocol("SSLv3");
sslContextParameters.setSecureSocketProtocol("TLSv1.2");
sslContextParameters.setTrustManagers(tmp);

return sslContextParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,10 +30,9 @@ public class FileToFtpsExplicitSSLWithoutClientAuthIT extends FtpsServerExplicit
protected String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true&delete=true"
+ "&securityProtocol=SSLv3&implicit=false";
+ "&securityProtocol=TLSv1.2&implicit=false";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected String getFtpUrl() {
+ "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Disabled("Embedded Apache FtpServer does not support TLS 1.3")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected String getFtpUrl() {
+ "&securityProtocol=TLSv1.3&implicit=false&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Disabled("Embedded Apache FtpServer does not support TLS 1.3")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public SSLContextParameters createSslContextParams() {
tmp.setKeyStore(ksp);

SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setSecureSocketProtocol("SSLv3");
sslContextParameters.setSecureSocketProtocol("TLSv1.2");
sslContextParameters.setKeyManagers(kmp);
sslContextParameters.setTrustManagers(tmp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,11 +30,10 @@ public class FileToFtpsImplicitSSLWithClientAuthIT extends FtpsServerImplicitSSL
protected String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ "&securityProtocol=SSLv3&implicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&securityProtocol=TLSv1.2&implicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public SSLContextParameters createSslContextParams() {
tmp.setKeyStore(ksp);

SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setSecureSocketProtocol("SSLv3");
sslContextParameters.setSecureSocketProtocol("TLSv1.2");
sslContextParameters.setTrustManagers(tmp);

return sslContextParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,10 +30,9 @@ public class FileToFtpsImplicitSSLWithoutClientAuthIT extends FtpsServerImplicit
protected String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ "&securityProtocol=SSLv3&implicit=true&delete=true";
+ "&securityProtocol=TLSv1.2&implicit=true&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected String getFtpUrl() {
+ "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Disabled("Embedded Apache FtpServer does not support TLS 1.3")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected String getFtpUrl() {
+ "&securityProtocol=TLSv1.3&implicit=true&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Disabled("Embedded Apache FtpServer does not support TLS 1.3")
@Test
public void testFromFileToFtp() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,13 +30,12 @@ public class FileToFtpsWithCustomKeyAndTrustStorePropertiesIT extends FtpsServer
private String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ "&securityProtocol=SSLv3&implicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&securityProtocol=TLSv1.2&implicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password"
+ "&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS"
+ "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password&delete=true";
}

@Disabled
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,11 +30,10 @@ public class FileToFtpsWithCustomTrustStorePropertiesIT extends FtpsServerExplic
private String getFtpUrl() {
return "ftps://admin@localhost:{{ftp.server.port}}"
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ "&securityProtocol=SSLv3&implicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS"
+ "&securityProtocol=TLSv1.2&implicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS"
+ "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private String getFtpUrl() {
+ "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Disabled("Embedded Apache FtpServer does not support TLS 1.3")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.commons.net.ftp.FTPSClient;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

Expand All @@ -31,18 +30,17 @@
public class FileToFtpsWithFtpClientConfigRefIT extends FtpsServerExplicitSSLWithoutClientAuthTestSupport {

@BindToRegistry("ftpsClient")
private final FTPSClient client = new FTPSClient("SSLv3");
private final FTPSClient client = new FTPSClient("TLSv1.2");

@BindToRegistry("ftpsClientIn")
private final FTPSClient client1 = new FTPSClient("SSLv3");
private final FTPSClient client1 = new FTPSClient("TLSv1.2");

private String getFtpUrl(boolean in) {
return "ftps://admin@localhost:{{ftp.server.port}}/tmp2/camel?password=admin&initialDelay=2000&ftpClient=#ftpsClient"
+ (in ? "In" : "")
+ "&disableSecureDataChannelDefaults=true&delete=true";
}

@Disabled("CAMEL-16784:Disable testFromFileToFtp tests")
@Test
public void testFromFileToFtp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
* Abstract base class for unit testing using a secure FTP Server (over SSL/TLS)
*/
public abstract class FtpsServerTestSupport extends BaseServerTestSupport {
protected static final String AUTH_VALUE_SSL = "SSLv3";
protected static final String AUTH_VALUE_SSL = "TLSv1.2";
protected static final String AUTH_VALUE_TLS = "TLSv1.3";
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.concurrent.TimeUnit;
import java.util.function.Function;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.util.ResourceLeakDetector;
import org.apache.camel.Exchange;
Expand All @@ -47,7 +46,6 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
Expand All @@ -56,9 +54,6 @@

import static org.assertj.core.api.Assertions.assertThat;

@Disabled("TODO: https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-16718")
// this test was working before due to a netty ref count exception was ignored (seems we attempt to write 2 times)
// now this real caused exception is detected by Camel
public class ProxyProtocolTest {

private static final Logger LOG = LoggerFactory.getLogger(ProxyProtocolTest.class);
Expand Down Expand Up @@ -272,12 +267,10 @@ private static InputStream request(final String url, final String payload, final

private static void uppercase(final Exchange exchange) {
final Message message = exchange.getMessage();
final ByteBuf body = message.getBody(ByteBuf.class);
final String body = message.getBody(String.class);

if (body.capacity() != 0) {
// only if we received a payload we'll uppercase it
message.setBody(body.toString(StandardCharsets.US_ASCII).toUpperCase(Locale.US));
if (ObjectHelper.isNotEmpty(body)) {
message.setBody(body.toUpperCase(Locale.US));
}
body.release();
}
}
Loading
Loading