From 00d1fb35827efbf425ebf23431f0b31dbb3a0ba9 Mon Sep 17 00:00:00 2001 From: Parthvi Vala Date: Mon, 20 Jun 2022 16:21:58 +0530 Subject: [PATCH] Fix test failure --- ...evfile-deploy-with-multiple-resources.yaml | 136 ++++++++++++++++++ tests/integration/devfile/cmd_delete_test.go | 2 +- 2 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 tests/examples/source/devfiles/nodejs/devfile-deploy-with-multiple-resources.yaml diff --git a/tests/examples/source/devfiles/nodejs/devfile-deploy-with-multiple-resources.yaml b/tests/examples/source/devfiles/nodejs/devfile-deploy-with-multiple-resources.yaml new file mode 100644 index 00000000000..7c90ac94068 --- /dev/null +++ b/tests/examples/source/devfiles/nodejs/devfile-deploy-with-multiple-resources.yaml @@ -0,0 +1,136 @@ +commands: + - exec: + commandLine: npm install + component: runtime + group: + isDefault: true + kind: build + workingDir: /project + id: install + - exec: + commandLine: npm start + component: runtime + group: + isDefault: true + kind: run + workingDir: /project + id: run + - exec: + commandLine: npm run debug + component: runtime + group: + isDefault: true + kind: debug + workingDir: /project + id: debug + - exec: + commandLine: npm test + component: runtime + group: + isDefault: true + kind: test + workingDir: /project + id: test + - id: build-image + apply: + component: outerloop-build + - id: deployk8s + apply: + component: outerloop-deploy + - id: deployservice + apply: + component: outerloop-deploy-2 + - id: deploy + composite: + commands: + - build-image + - deployk8s + - deployservice + group: + kind: deploy + isDefault: true +components: + - container: + endpoints: + - name: http-3000 + targetPort: 3000 + image: registry.access.redhat.com/ubi8/nodejs-14:latest + memoryLimit: 1024Mi + mountSources: true + sourceMapping: /project + name: runtime + - name: outerloop-build + image: + imageName: "{{CONTAINER_IMAGE}}" + dockerfile: + uri: ./Dockerfile + buildContext: ${PROJECTS_ROOT} + rootRequired: false + + - name: outerloop-deploy + kubernetes: + inlined: | + kind: Deployment + apiVersion: apps/v1 + metadata: + name: my-component + spec: + replicas: 1 + selector: + matchLabels: + app: node-app + template: + metadata: + labels: + app: node-app + spec: + containers: + - name: main + image: {{CONTAINER_IMAGE}} + resources: + limits: + memory: "128Mi" + cpu: "500m" + + - name: outerloop-deploy-2 + kubernetes: + inlined: | + apiVersion: v1 + kind: Service + metadata: + creationTimestamp: null + labels: + app: my-cs + name: my-cs + spec: + ports: + - name: 5678-8080 + port: 5678 + protocol: TCP + targetPort: 8080 + selector: + app: my-cs + type: ClusterIP + status: + loadBalancer: {} + +metadata: + description: Stack with Node.js 14 + displayName: Node.js Runtime + icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg + language: javascript + name: mynodejs + projectType: nodejs + tags: + - NodeJS + - Express + - ubi8 + version: 1.0.1 +schemaVersion: 2.2.0 +starterProjects: + - git: + remotes: + origin: https://github.com/odo-devfiles/nodejs-ex.git + name: nodejs-starter +variables: + CONTAINER_IMAGE: quay.io/unknown-account/myimage diff --git a/tests/integration/devfile/cmd_delete_test.go b/tests/integration/devfile/cmd_delete_test.go index a170f232c74..c0781d0a8b4 100644 --- a/tests/integration/devfile/cmd_delete_test.go +++ b/tests/integration/devfile/cmd_delete_test.go @@ -36,7 +36,7 @@ var _ = Describe("odo delete command tests", func() { }{ { title: "a component is bootstrapped", - devfileName: "devfile-deploy-with-multiple-resources", + devfileName: "devfile-deploy-with-multiple-resources.yaml", }, { title: "a component is bootstrapped using a devfile.yaml with URI-referenced Kubernetes components",