Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class ConfigMapDependentResource
extends CRUDKubernetesDependentResource<
ConfigMap, CreateOnlyIfNotExistingDependentWithSSACustomResource> {

public static final String DRKEY = "drkey";

@Override
protected ConfigMap desired(
CreateOnlyIfNotExistingDependentWithSSACustomResource primary,
Expand All @@ -21,7 +23,7 @@ protected ConfigMap desired(
.withName(primary.getMetadata().getName())
.withNamespace(primary.getMetadata().getNamespace())
.build());
configMap.setData(Map.of("drkey", "v"));
configMap.setData(Map.of(DRKEY, "v"));
return configMap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.time.Duration;
import java.util.Map;
import java.util.Set;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -22,6 +23,9 @@ class CreateOnlyIfNotExistingDependentWithSSAIT {
@RegisterExtension
LocallyRunOperatorExtension extension =
LocallyRunOperatorExtension.builder()
// for the sake of this test, we allow to manage ConfigMaps with SSA
// by removing it from the non SSA resources (it is not managed with SSA by default)
.withConfigurationService(o -> o.withDefaultNonSSAResource(Set.of()))
.withReconciler(new CreateOnlyIfNotExistingDependentWithSSAReconciler())
.build();

Expand All @@ -41,7 +45,7 @@ void createsResourceOnlyIfNotExisting() {
.untilAsserted(
() -> {
var currentCM = extension.get(ConfigMap.class, TEST_RESOURCE_NAME);
assertThat(currentCM.getData()).containsKey(KEY);
assertThat(currentCM.getData()).containsOnlyKeys(KEY);
});
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<log4j.version>2.25.1</log4j.version>
<mokito.version>5.19.0</mokito.version>
<commons-lang3.version>3.18.0</commons-lang3.version>
<compile-testing.version>0.21.0</compile-testing.version>
<compile-testing.version>0.22.0</compile-testing.version>
<javapoet.version>1.13.0</javapoet.version>
<assertj.version>3.27.4</assertj.version>
<awaitility.version>4.3.0</awaitility.version>
Expand Down
6 changes: 3 additions & 3 deletions sample-operators/mysql-schema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<version>1.24.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down