File tree Expand file tree Collapse file tree 6 files changed +130
-80
lines changed
operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/dependent/workflow Expand file tree Collapse file tree 6 files changed +130
-80
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ env :
4
+ MAVEN_ARGS : -V -ntp -e
5
+
6
+ on :
7
+ workflow_call :
8
+
9
+ jobs :
10
+ integration_tests :
11
+ strategy :
12
+ matrix :
13
+ java : [ 17, 21 ]
14
+ kubernetes : [ 'v1.28.14', 'v1.29.9','1.30.5', '1.31.1' ]
15
+ it-category : [ baseapi, dependent, workflow ]
16
+ uses : ./.github/workflows/integration-tests.yml
17
+ with :
18
+ java-version : ${{ matrix.java }}
19
+ kube-version : ${{ matrix.kubernetes }}
20
+ it-category : ${{ matrix.it-category }}
21
+
22
+ httpclient-tests :
23
+ strategy :
24
+ matrix :
25
+ httpclient : [ 'vertx', 'jdk', 'jetty' ]
26
+ uses : ./.github/workflows/integration-tests.yml
27
+ with :
28
+ java-version : 17
29
+ kube-version : ' v1.30.5'
30
+ http-client : ${{ matrix.httpclient }}
31
+ experimental : true
32
+
33
+ special_integration_tests :
34
+ runs-on : ubuntu-latest
35
+ strategy :
36
+ matrix :
37
+ java : [ 17, 21 ]
38
+ steps :
39
+ - uses : actions/checkout@v4
40
+ - name : Set up Java and Maven
41
+ uses : actions/setup-java@v4
42
+ with :
43
+ distribution : temurin
44
+ java-version : ${{ matrix.java }}
45
+ cache : ' maven'
46
+ - name : Run Special Integration Tests
47
+ run : ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
Original file line number Diff line number Diff line change 27
27
- name : Run unit tests
28
28
run : ./mvnw ${MAVEN_ARGS} clean install --file pom.xml
29
29
30
- integration_tests :
31
- strategy :
32
- matrix :
33
- java : [ 11, 17 ]
34
- kubernetes : ['v1.28.12', 'v1.29.7','1.30.3', '1.31.0']
35
- uses : ./.github/workflows/integration-tests.yml
36
- with :
37
- java-version : ${{ matrix.java }}
38
- kube-version : ${{ matrix.kubernetes }}
39
-
40
- httpclient-tests :
41
- strategy :
42
- matrix :
43
- httpclient : [ 'vertx', 'jdk', 'jetty' ]
44
- uses : ./.github/workflows/integration-tests.yml
45
- with :
46
- java-version : 17
47
- kube-version : ' v1.29.1'
48
- http-client : ${{ matrix.httpclient }}
49
- experimental : true
50
- checkout-ref : ' fabric8-next-version'
51
-
52
- special_integration_tests :
53
- runs-on : ubuntu-latest
54
- strategy :
55
- matrix :
56
- java : [ 11, 17 ]
57
- steps :
58
- - uses : actions/checkout@v4
59
- with :
60
- ref : ' fabric8-next-version'
61
- - name : Set up Java and Maven
62
- uses : actions/setup-java@v4
63
- with :
64
- distribution : temurin
65
- java-version : ${{ matrix.java }}
66
- cache : ' maven'
67
- - name : Run Special Integration Tests
68
- run : ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
30
+ build :
31
+ uses : ./.github/workflows/build.yml
Original file line number Diff line number Diff line change 21
21
type : string
22
22
required : false
23
23
default : ' '
24
+ it-category :
25
+ type : string
26
+ required : false
27
+ default : ' '
24
28
25
29
jobs :
26
30
integration_tests :
42
46
- name : Set up Minikube
43
47
uses : manusa/actions-setup-minikube@v2.12.0
44
48
with :
45
- minikube version : v1.33.0
46
- kubernetes version : ${{ inputs.kube-version }}
49
+ minikube version : ' v1.33.0'
50
+ kubernetes version : ' ${{ inputs.kube-version }}'
47
51
driver : ' docker'
48
52
github token : ${{ secrets.GITHUB_TOKEN }}
49
53
- name : Run integration tests
50
- run : ./mvnw ${MAVEN_ARGS} -B package -P no-unit-tests -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
54
+ run : |
55
+ it_profile="integration-tests"
56
+ if [ -z "${{inputs.it-category}}" ]; then
57
+ it_profile="integration-tests-${{inputs.it-category}}"
58
+ fi
59
+ ./mvnw ${MAVEN_ARGS} -B package -P${it_profile} -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
Original file line number Diff line number Diff line change 30
30
- name : Run unit tests
31
31
run : ./mvnw ${MAVEN_ARGS} clean install --file pom.xml
32
32
33
- integration_tests :
34
- strategy :
35
- matrix :
36
- java : [ 17, 21 ]
37
- kubernetes : [ 'v1.28.12', 'v1.29.7','1.30.3', '1.31.0' ]
38
- uses : ./.github/workflows/integration-tests.yml
39
- with :
40
- java-version : ${{ matrix.java }}
41
- kube-version : ${{ matrix.kubernetes }}
42
-
43
- httpclient-tests :
44
- strategy :
45
- matrix :
46
- httpclient : [ 'vertx', 'jdk', 'jetty' ]
47
- uses : ./.github/workflows/integration-tests.yml
48
- with :
49
- java-version : 17
50
- kube-version : ' v1.29.1'
51
- http-client : ${{ matrix.httpclient }}
52
- experimental : true
53
-
54
- special_integration_tests :
55
- runs-on : ubuntu-latest
56
- strategy :
57
- matrix :
58
- java : [ 17, 21 ]
59
- steps :
60
- - uses : actions/checkout@v4
61
- - name : Set up Java and Maven
62
- uses : actions/setup-java@v4
63
- with :
64
- distribution : temurin
65
- java-version : ${{ matrix.java }}
66
- cache : ' maven'
67
- - name : Run Special Integration Tests
68
- run : ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
33
+ build :
34
+ uses : ./.github/workflows/build.yml
Original file line number Diff line number Diff line change 6
6
import org .assertj .core .api .Assertions ;
7
7
import org .junit .jupiter .api .BeforeEach ;
8
8
import org .junit .jupiter .api .Test ;
9
+ import org .junit .jupiter .api .TestInfo ;
10
+ import org .slf4j .Logger ;
11
+ import org .slf4j .LoggerFactory ;
9
12
10
13
import io .fabric8 .kubernetes .api .model .ConfigMap ;
11
14
import io .fabric8 .kubernetes .api .model .HasMetadata ;
20
23
import static org .mockito .Mockito .*;
21
24
22
25
class WorkflowReconcileExecutorTest extends AbstractWorkflowExecutorTest {
26
+ private static final Logger log = LoggerFactory .getLogger (WorkflowReconcileExecutorTest .class );
23
27
24
28
@ SuppressWarnings ("unchecked" )
25
29
Context <TestCustomResource > mockContext = mock (Context .class );
@@ -30,7 +34,8 @@ class WorkflowReconcileExecutorTest extends AbstractWorkflowExecutorTest {
30
34
31
35
@ BeforeEach
32
36
@ SuppressWarnings ("unchecked" )
33
- void setup () {
37
+ void setup (TestInfo testInfo ) {
38
+ log .debug ("==> Starting test {}" , testInfo .getDisplayName ());
34
39
when (mockContext .getWorkflowExecutorService ()).thenReturn (executorService );
35
40
when (mockContext .eventSourceRetriever ()).thenReturn (mock (EventSourceRetriever .class ));
36
41
}
Original file line number Diff line number Diff line change 367
367
</build >
368
368
</profile >
369
369
<profile >
370
- <id >no-unit -tests</id >
370
+ <id >integration -tests</id >
371
371
<build >
372
372
<plugins >
373
373
<plugin >
386
386
</plugins >
387
387
</build >
388
388
</profile >
389
+ <profile >
390
+ <id >integration-tests-baseapi</id >
391
+ <build >
392
+ <plugins >
393
+ <plugin >
394
+ <groupId >org.apache.maven.plugins</groupId >
395
+ <artifactId >maven-surefire-plugin</artifactId >
396
+ <configuration >
397
+ <includes >
398
+ <include >io/javaoperatorsdk/operator/baseapi/**/*IT.java</include >
399
+ </includes >
400
+ <excludes >
401
+ <exclude >**/*Test.java</exclude >
402
+ <exclude >**/*E2E.java</exclude >
403
+ </excludes >
404
+ </configuration >
405
+ </plugin >
406
+ </plugins >
407
+ </build >
408
+ </profile >
409
+ <profile >
410
+ <id >integration-tests-dependent</id >
411
+ <build >
412
+ <plugins >
413
+ <plugin >
414
+ <groupId >org.apache.maven.plugins</groupId >
415
+ <artifactId >maven-surefire-plugin</artifactId >
416
+ <configuration >
417
+ <includes >
418
+ <include >io/javaoperatorsdk/operator/dependent/**/*IT.java</include >
419
+ </includes >
420
+ <excludes >
421
+ <exclude >**/*Test.java</exclude >
422
+ <exclude >**/*E2E.java</exclude >
423
+ </excludes >
424
+ </configuration >
425
+ </plugin >
426
+ </plugins >
427
+ </build >
428
+ </profile >
429
+ <profile >
430
+ <id >integration-tests-workflow</id >
431
+ <build >
432
+ <plugins >
433
+ <plugin >
434
+ <groupId >org.apache.maven.plugins</groupId >
435
+ <artifactId >maven-surefire-plugin</artifactId >
436
+ <configuration >
437
+ <includes >
438
+ <include >io/javaoperatorsdk/operator/workflow/**/*IT.java</include >
439
+ </includes >
440
+ <excludes >
441
+ <exclude >**/*Test.java</exclude >
442
+ <exclude >**/*E2E.java</exclude >
443
+ </excludes >
444
+ </configuration >
445
+ </plugin >
446
+ </plugins >
447
+ </build >
448
+ </profile >
389
449
<!-- Special category of tests. See usage in source code. -->
390
450
<profile >
391
451
<id >minimal-watch-timeout-dependent-it</id >
You can’t perform that action at this time.
0 commit comments