File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
java/io/csviri/operator/glue
resources/sample/secretcopy Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1717import io .csviri .operator .glue .reconciler .ValidationAndErrorHandler ;
1818import io .fabric8 .kubernetes .api .model .ConfigMap ;
1919import io .fabric8 .kubernetes .api .model .ObjectMetaBuilder ;
20+ import io .fabric8 .kubernetes .api .model .Secret ;
21+ import io .fabric8 .kubernetes .client .dsl .NonDeletingOperation ;
2022import io .quarkus .test .junit .QuarkusTest ;
2123
2224import static io .csviri .operator .glue .TestData .*;
@@ -193,8 +195,22 @@ void parentWithLabelSelector() {
193195 @ Disabled
194196 @ Test
195197 void secretCopySample () {
196- create (TestUtils
197- .loadGlueOperator ("/glueoperator/ParentLabelSelector.yaml" ));
198+ var secret = TestUtils .load ("/sample/secretcopy/secret-to-copy.yaml" , Secret .class );
199+ client .resource (secret ).createOr (NonDeletingOperation ::update );
200+
201+ var go = create (TestUtils
202+ .loadGlueOperator ("/sample/secretcopy/secret-copy.operator.yaml" ));
203+
204+ await ().untilAsserted (() -> {
205+ var namespaces = client .namespaces ().list ().getItems ();
206+ namespaces .forEach (ns -> {
207+ var copiedSecret =
208+ client .secrets ().inNamespace (ns .getMetadata ().getName ()).withName ("copied-secret" );
209+ assertThat (copiedSecret ).isNotNull ();
210+ });
211+ });
212+
213+
198214 }
199215
200216
File renamed without changes.
You can’t perform that action at this time.
0 commit comments