File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
src/test/java/org/apache/james/clamav
src/test/java/org/apache/james/rspamd Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ services:
85
85
- james
86
86
87
87
clamav :
88
- image : clamav/clamav:0.105
88
+ image : clamav/clamav:1.1
89
89
networks :
90
90
- james
91
91
Original file line number Diff line number Diff line change 20
20
package org .apache .james .clamav ;
21
21
22
22
import java .time .Duration ;
23
+ import java .util .UUID ;
23
24
24
25
import org .testcontainers .containers .GenericContainer ;
25
- import org .testcontainers .containers .wait .strategy .LogMessageWaitStrategy ;
26
+ import org .testcontainers .containers .wait .strategy .Wait ;
26
27
import org .testcontainers .utility .DockerImageName ;
27
28
28
29
public class DockerClamAV {
29
- private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("clamav/clamav" );
30
- private static final String DEFAULT_TAG = "0.105" ;
30
+ private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("clamav/clamav" ).withTag ("1.1" );
31
31
private static final int DEFAULT_PORT = 3310 ;
32
32
33
33
private final GenericContainer <?> container ;
34
34
35
35
public DockerClamAV () {
36
- this .container = new GenericContainer <>(DEFAULT_IMAGE_NAME . withTag ( DEFAULT_TAG ) )
36
+ this .container = new GenericContainer <>(DEFAULT_IMAGE_NAME )
37
37
.withExposedPorts (DEFAULT_PORT )
38
38
.withEnv ("CLAMAV_NO_FRESHCLAMD" , "true" )
39
39
.withEnv ("CLAMAV_NO_MILTERD" , "true" )
40
- .waitingFor (new LogMessageWaitStrategy ().withRegEx (".*clamd started.*\\ n" ).withTimes (1 )
40
+ .withCreateContainerCmdModifier (createContainerCmd -> createContainerCmd .withName ("james-clamav-test-" + UUID .randomUUID ()))
41
+ .waitingFor (Wait .forHealthcheck ()
41
42
.withStartupTimeout (Duration .ofMinutes (5 )));
42
43
}
43
44
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ services:
95
95
- james
96
96
97
97
clamav :
98
- image : clamav/clamav:0.105
98
+ image : clamav/clamav:1.1
99
99
networks :
100
100
- james
101
101
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ services:
36
36
- " debug"
37
37
38
38
clamav :
39
- image : clamav/clamav:0.105
39
+ image : clamav/clamav:1.1
40
40
41
41
rspamd :
42
42
depends_on :
Original file line number Diff line number Diff line change 28
28
import org .testcontainers .utility .DockerImageName ;
29
29
30
30
public class DockerClamAV {
31
- private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("clamav/clamav" );
32
- private static final String DEFAULT_TAG = "0.105" ;
31
+ private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("clamav/clamav" ).withTag ("1.1" );
33
32
private static final int DEFAULT_PORT = 3310 ;
34
33
35
34
private final GenericContainer <?> container ;
36
35
37
36
public DockerClamAV (Network network ) {
38
- this .container = new GenericContainer <>(DEFAULT_IMAGE_NAME . withTag ( DEFAULT_TAG ) )
37
+ this .container = new GenericContainer <>(DEFAULT_IMAGE_NAME )
39
38
.withExposedPorts (DEFAULT_PORT )
40
39
.withEnv ("CLAMAV_NO_FRESHCLAMD" , "true" )
41
40
.withEnv ("CLAMAV_NO_MILTERD" , "true" )
You can’t perform that action at this time.
0 commit comments