File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
test-frame-common/src/main/java/io/skodjob/testframe/annotations
test-frame-test/src/test/java/io/skodjob/testframe/test/integration Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 9
9
import org .junit .jupiter .api .extension .ExtendWith ;
10
10
11
11
import java .lang .annotation .ElementType ;
12
+ import java .lang .annotation .Inherited ;
12
13
import java .lang .annotation .Retention ;
13
14
import java .lang .annotation .Target ;
14
15
23
24
*/
24
25
@ Target (ElementType .TYPE )
25
26
@ Retention (RUNTIME )
27
+ @ Inherited
26
28
@ ExtendWith (ResourceManagerExtension .class )
27
29
@ ExtendWith (ResourceManagerCleanerExtension .class )
28
30
public @interface ResourceManager {
Original file line number Diff line number Diff line change
1
+ package io .skodjob .testframe .test .integration ;
2
+
3
+ import io .skodjob .testframe .annotations .ResourceManager ;
4
+
5
+ @ ResourceManager ()
6
+ public class AbstractIT {
7
+ protected String nsName = "test" ;
8
+ }
Original file line number Diff line number Diff line change 6
6
7
7
import io .fabric8 .kubernetes .api .model .Namespace ;
8
8
import io .fabric8 .kubernetes .api .model .NamespaceBuilder ;
9
- import io .skodjob .testframe .annotations .ResourceManager ;
10
9
import io .skodjob .testframe .annotations .TestVisualSeparator ;
11
10
import io .skodjob .testframe .clients .KubeClusterException ;
12
11
import io .skodjob .testframe .resources .KubeResourceManager ;
20
19
import static org .junit .jupiter .api .Assertions .assertNull ;
21
20
import static org .junit .jupiter .api .Assertions .assertThrows ;
22
21
23
- @ ResourceManager
24
22
@ TestVisualSeparator
25
23
@ TestInstance (TestInstance .Lifecycle .PER_CLASS )
26
- public class KubeResourceManagerCleanerIT {
24
+ public class KubeResourceManagerCleanerIT extends AbstractIT {
27
25
28
26
@ BeforeAll
29
27
void setupAll () {
30
28
KubeResourceManager .getInstance ().createResourceWithWait (
31
- new NamespaceBuilder ().withNewMetadata ().withName ("test" ).endMetadata ().build ());
29
+ new NamespaceBuilder ().withNewMetadata ().withName (nsName ).endMetadata ().build ());
32
30
}
33
31
34
32
@ BeforeEach
You can’t perform that action at this time.
0 commit comments