Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi committed May 20, 2024
1 parent 5bc7f2f commit 64e00d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ public class AppControllerIT {
new OperatorExtension(
Map.of(
"DEPLOYER_AGENT_RESOURCES",
"{defaultMaxTotalResourceUnitsPerTenant: 3}",
"DEPLOYER_RUNTIME_IMAGE", "bash",
"DEPLOYER_RUNTIME_IMAGE_PULL_POLICY", "IfNotPresent"));
"{defaultMaxTotalResourceUnitsPerTenant: 3}",
"DEPLOYER_RUNTIME_IMAGE",
"bash",
"DEPLOYER_RUNTIME_IMAGE_PULL_POLICY",
"IfNotPresent"));

static AtomicInteger counter = new AtomicInteger(0);

Expand All @@ -75,17 +77,17 @@ void testAppController() {
final ApplicationCustomResource resource =
getCr(
"""
apiVersion: langstream.ai/v1alpha1
kind: Application
metadata:
name: %s
namespace: %s
spec:
image: bash
imagePullPolicy: IfNotPresent
application: '{"modules": {}}'
tenant: %s
"""
apiVersion: langstream.ai/v1alpha1
kind: Application
metadata:
name: %s
namespace: %s
spec:
image: bash
imagePullPolicy: IfNotPresent
application: '{"modules": {}}'
tenant: %s
"""
.formatted(applicationId, namespace, tenant));
final KubernetesClient client = deployment.getClient();
deployment
Expand Down Expand Up @@ -444,9 +446,7 @@ private void checkDeployerJob(Job job, boolean cleanup) {
assertEquals("bash", initContainer.getCommand().get(0));
assertEquals("-c", initContainer.getCommand().get(1));
assertEquals(
"echo '{\"applicationId\":\"my-app\",\"tenant\":\"my-tenant\",\"application\":\"{\\\"modules\\\": "
+ "{}}\",\"codeStorageArchiveId\":null}' > /app-config/config && echo '{}' > "
+ "/cluster-runtime-config/config",
"echo '{\"applicationId\":\"my-app\",\"tenant\":\"my-tenant\",\"application\":\"{\\\"modules\\\": {}}\",\"codeStorageArchiveId\":null,\"deployFlags\":{\"autoUpgradeRuntimeImage\":false,\"autoUpgradeRuntimeImagePullPolicy\":false,\"autoUpgradeAgentResources\":false,\"autoUpgradeAgentPodTemplate\":false,\"seed\":0}}' > /app-config/config && echo '{}' > /cluster-runtime-config/config",
initContainer.getArgs().get(0));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class KubernetesClusterRuntimeDockerTest {
static KafkaContainerExtension kafkaContainer = new KafkaContainerExtension();

private ApplicationDeployer getDeployer() {
return getDeployer(null);
return getDeployer(DeployContext.NO_DEPLOY_CONTEXT);
}

private ApplicationDeployer getDeployer(DeployContext deployContext) {
Expand Down

0 comments on commit 64e00d8

Please sign in to comment.