File tree 3 files changed +23
-3
lines changed
main/java/io/javaoperatorsdk/webhook/admission/sample/quarkus/conversion
test/java/io/javaoperatorsdk/webhook/admission/sample/quarkus/conversion
3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 54
54
<groupId >io.fabric8</groupId >
55
55
<artifactId >kubernetes-client</artifactId >
56
56
</dependency >
57
-
58
57
<dependency >
59
58
<groupId >org.slf4j</groupId >
60
59
<artifactId >slf4j-api</artifactId >
Original file line number Diff line number Diff line change
1
+ package io .javaoperatorsdk .webhook .admission .sample .quarkus .conversion ;
2
+
3
+ import javax .inject .Singleton ;
4
+
5
+ import io .javaoperatorsdk .webhook .conversion .Utils ;
6
+ import io .javaoperatorsdk .webhook .sample .commons .customresource .MultiVersionCustomResource ;
7
+ import io .javaoperatorsdk .webhook .sample .commons .customresource .MultiVersionCustomResourceV2 ;
8
+ import io .quarkus .jackson .ObjectMapperCustomizer ;
9
+
10
+ import com .fasterxml .jackson .databind .ObjectMapper ;
11
+
12
+ /**
13
+ * For quarkus for now the custom kinds needs to be registered explicitly
14
+ */
15
+ @ Singleton
16
+ public class CustomResourceDeserializationCustomizer implements ObjectMapperCustomizer {
17
+
18
+ @ Override
19
+ public void customize (ObjectMapper objectMapper ) {
20
+ Utils .registerCustomKind (MultiVersionCustomResource .class );
21
+ Utils .registerCustomKind (MultiVersionCustomResourceV2 .class );
22
+ }
23
+ }
Original file line number Diff line number Diff line change 4
4
import java .io .InputStream ;
5
5
import java .nio .charset .StandardCharsets ;
6
6
7
- import org .junit .jupiter .api .Disabled ;
8
7
import org .junit .jupiter .api .Test ;
9
8
10
9
import io .quarkus .test .junit .QuarkusTest ;
15
14
import static io .restassured .RestAssured .given ;
16
15
import static org .hamcrest .CoreMatchers .is ;
17
16
18
- @ Disabled
19
17
@ QuarkusTest
20
18
class ConversionEndpointTest {
21
19
You can’t perform that action at this time.
0 commit comments