Skip to content

feat: update control update methods with change check #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: multiversion crd integration test improvements (#1415)
  • Loading branch information
csviri committed Aug 24, 2022
commit d809957b807f023682d9d026050412f56ae5d689
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import io.javaoperatorsdk.operator.sample.multiversioncrd.MultiVersionCRDTestReconciler1;
import io.javaoperatorsdk.operator.sample.multiversioncrd.MultiVersionCRDTestReconciler2;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static com.google.common.truth.Truth.assertThat;
import static org.awaitility.Awaitility.await;

class MultiVersionCRDIT {
Expand All @@ -38,16 +38,16 @@ void multipleCRDVersions() {
await()
.atMost(Duration.ofSeconds(2))
.pollInterval(Duration.ofMillis(50))
.until(
.untilAsserted(
() -> {
var crV1Now = operator.get(MultiVersionCRDTestCustomResource1.class, CR_V1_NAME);
var crV2Now = operator.get(MultiVersionCRDTestCustomResource2.class, CR_V2_NAME);
return crV1Now.getStatus().getReconciledBy().size() == 1
&& crV1Now.getStatus().getReconciledBy()
.contains(MultiVersionCRDTestReconciler1.class.getSimpleName())
&& crV2Now.getStatus().getReconciledBy().size() == 1
&& crV2Now.getStatus().getReconciledBy()
.contains(MultiVersionCRDTestReconciler2.class.getSimpleName());
assertThat(crV1Now.getStatus()).isNotNull();
assertThat(crV2Now.getStatus()).isNotNull();
assertThat(crV1Now.getStatus().getReconciledBy())
.containsExactly(MultiVersionCRDTestReconciler1.class.getSimpleName());
assertThat(crV2Now.getStatus().getReconciledBy())
.containsExactly(MultiVersionCRDTestReconciler2.class.getSimpleName());
});
}

Expand All @@ -62,10 +62,11 @@ void invalidEventsDoesNotBreakEventHandling() {
await()
.atMost(Duration.ofSeconds(2))
.pollInterval(Duration.ofMillis(50))
.until(() -> {
.untilAsserted(() -> {
var crV1Now = operator.get(MultiVersionCRDTestCustomResource1.class, CR_V1_NAME);
return crV1Now.getStatus().getReconciledBy()
.contains(MultiVersionCRDTestReconciler1.class.getSimpleName());
assertThat(crV1Now.getStatus()).isNotNull();
assertThat(crV1Now.getStatus().getReconciledBy())
.containsExactly(MultiVersionCRDTestReconciler1.class.getSimpleName());
});
assertThat(
operator
Expand Down