Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
feat(k8-devservice): add a test for the actual underlying k8 resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRousey committed Apr 26, 2023
1 parent 5b97178 commit 6283538
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 4 additions & 4 deletions platform-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
quarkus :
kubernetes-client:
devservices:
flavor: kind
override-kubeconfig: true
application:
name: datacater
version: '2023.2'
Expand Down Expand Up @@ -169,6 +165,10 @@ datacater :
name: datacater/python-runner
version: 2023.2
quarkus:
kubernetes-client:
devservices:
flavor: kind
override-kubeconfig: true
log:
level: INFO
console:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,20 @@ void testCreateDeploymentWithCustomReplicas() throws IOException {
LOGGER.info(
"testCreateDeploymentWithCustomReplicas response: " + responseDeployment.body().asString());

int replicaAmount =
client
.apps()
.replicaSets()
.inAnyNamespace()
.withLabel("datacater.io/uuid", deployment.getId().toString())
.list()
.getItems()
.get(0)
.getSpec()
.getReplicas();

Assertions.assertEquals(200, responseDeployment.getStatusCode());
Assertions.assertTrue(k8DeploymentString.contains("replicas=3"));
Assertions.assertEquals(3, replicaAmount);
}
}

0 comments on commit 6283538

Please sign in to comment.