diff --git a/test-cases/probes/probes_build.bal b/test-cases/probes/probes_build.bal deleted file mode 100644 index 9acc4819..00000000 --- a/test-cases/probes/probes_build.bal +++ /dev/null @@ -1,93 +0,0 @@ -import ballerina/io; -import celleryio/cellery; - -public function build(cellery:ImageName iName) returns error? { - int salaryContainerPort = 8080; - - // Salary Component - cellery:Component salaryComponent = { - name: "salary", - source: { - image: "docker.io/celleryio/sampleapp-salary" - }, - ingresses: { - SalaryAPI: { - port:salaryContainerPort, - context: "payroll", - definition: { - resources: [ - { - path: "salary", - method: "GET" - } - ] - }, - expose: "local" - } - }, - probes: { - liveness: { - initialDelaySeconds: 30, - kind: { - port:salaryContainerPort - } - } - } - }; - - // Employee Component - int empPort = 8080; - cellery:Component employeeComponent = { - name: "employee", - source: { - image: "docker.io/celleryio/sampleapp-employee" - }, - ingresses: { - employee: { - port:empPort, - context: "employee", - expose: "local" - } - }, - probes: { - liveness: { - initialDelaySeconds: 30, - kind: { - port:empPort - } - }, - readiness: { - initialDelaySeconds: 10, - timeoutSeconds: 50, - kind: { - commands: ["bin", "bash", "-version"] - } - } - }, - envVars: { - SALARY_HOST: { - value: cellery:getHost(salaryComponent) - } - } - }; - - cellery:CellImage employeeCell = { - components: { - empComp: employeeComponent, - salaryComp: salaryComponent - } - }; - - return cellery:createImage(employeeCell, untaint iName); -} - - -public function run(cellery:ImageName iName, map instances) returns error? { - cellery:CellImage employeeCell = check cellery:constructCellImage(untaint iName); - return cellery:createInstance(employeeCell, iName, instances); -} - - -public function main(string action, cellery:ImageName iName, map instances) returns error? { - return build(iName); -} \ No newline at end of file