Skip to content

Commit

Permalink
[Tests] FTP: Use restrictions to bypass cert setup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
avano authored and jamesnetherton committed Sep 9, 2024
1 parent 5638aa9 commit 85456ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
@QuarkusTestResource(FtpTestResource.class)
@QuarkusTestResource(value = FtpTestResource.class, restrictToAnnotatedClass = true)
class FtpTest {
@Test
public void testFtpComponent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Format.PKCS12 }, password = "password") })
@Disabled //https://github.com/apache/camel-quarkus/issues/4089
@QuarkusTest
@QuarkusTestResource(FtpsTestResource.class)
@QuarkusTestResource(value = FtpsTestResource.class, restrictToAnnotatedClass = true)
class FtpsTest {
static final String CERTIFICATE_KEYSTORE_FILE = CertificatesUtil.keystoreFile("ftp", "p12");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public FtpsTestResource() {

@Override
protected ListenerFactory createListenerFactory(int port) {
//do not create a factory if keystore file does not exists
//because the test is disabled, but the test resource is "activated", this condition prevents the failure
//for the FtpTest
if (!Path.of(FtpsTest.CERTIFICATE_KEYSTORE_FILE).toFile().exists()) {
return null;
}

SslConfigurationFactory sslConfigFactory = new SslConfigurationFactory();
sslConfigFactory.setKeystoreFile(Path.of(FtpsTest.CERTIFICATE_KEYSTORE_FILE).toFile());
Expand Down

0 comments on commit 85456ca

Please sign in to comment.