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 17
17
import io .csviri .operator .glue .reconciler .ValidationAndErrorHandler ;
18
18
import io .fabric8 .kubernetes .api .model .ConfigMap ;
19
19
import io .fabric8 .kubernetes .api .model .ObjectMetaBuilder ;
20
+ import io .fabric8 .kubernetes .api .model .Secret ;
21
+ import io .fabric8 .kubernetes .client .dsl .NonDeletingOperation ;
20
22
import io .quarkus .test .junit .QuarkusTest ;
21
23
22
24
import static io .csviri .operator .glue .TestData .*;
@@ -193,8 +195,22 @@ void parentWithLabelSelector() {
193
195
@ Disabled
194
196
@ Test
195
197
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
+
198
214
}
199
215
200
216
File renamed without changes.
You can’t perform that action at this time.
0 commit comments