Skip to content

Commit

Permalink
test(integration): fix broken integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tthvo committed Apr 24, 2024
1 parent 5f1d89e commit eddd41e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/cryostat/discovery/CustomDiscovery.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public Response delete(@RestPath long id) throws URISyntaxException {
Target target = Target.find("id", id).singleResult();
DiscoveryNode realm = DiscoveryNode.getRealm(REALM).orElseThrow();
realm.children.remove(target.discoveryNode);
target.discoveryNode = null;
target.discoveryNode.parent = null;
realm.persist();
target.delete();
return Response.noContent().build();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/cryostat/discovery/KubeApiDiscovery.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static final class KubeConfig {
Optional<List<String>> watchNamespaces;

@ConfigProperty(name = "kubernetes.service.host")
String serviceHost;
Optional<String> serviceHost;

@ConfigProperty(name = "cryostat.discovery.kubernetes.namespace-path")
String namespacePath;
Expand Down Expand Up @@ -494,7 +494,7 @@ String getOwnNamespace() {
}

boolean kubeApiAvailable() {
return StringUtils.isNotBlank(serviceHost);
return StringUtils.isNotBlank(serviceHost.orElse(""));
}

KubernetesClient kubeClient() {
Expand Down

0 comments on commit eddd41e

Please sign in to comment.