-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for devfile storage and exec (#2838)
* Add integration tests for devfile storage and exec Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com> * Update devfile integration tests for port Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com> * Devfile integration tests, clone project Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com> * Update devfile integration tests to have springboot Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com> * update devfile delete integration test Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>
- Loading branch information
1 parent
77681be
commit 0da6ff4
Showing
17 changed files
with
468 additions
and
274 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
tests/examples/source/devfiles/nodejs-multicontainer/.gitignore
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
tests/examples/source/devfiles/nodejs-multicontainer/devfile.yaml
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
tests/examples/source/devfiles/nodejs-multicontainer/package.json
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
tests/examples/source/devfiles/nodejs-multicontainer/server.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
25 changes: 14 additions & 11 deletions
25
tests/examples/source/devfiles/nodejs/devfile-no-endpoints.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: test-devfile | ||
projects: | ||
- | ||
name: nodejs-web-app | ||
source: | ||
type: git | ||
location: "https://github.com/che-samples/web-nodejs-sample.git" | ||
components: | ||
- type: dockerimage | ||
image: node:stretch | ||
command: ["tail", "-f", "/dev/null"] | ||
image: quay.io/eclipse/che-nodejs10-ubi:nightly | ||
alias: runtime | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
commands: | ||
- | ||
name: build | ||
- name: devbuild | ||
actions: | ||
- | ||
type: exec | ||
- type: exec | ||
component: runtime | ||
command: "npm install" | ||
- | ||
name: devrun | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app | ||
- name: devrun | ||
actions: | ||
- | ||
type: exec | ||
- type: exec | ||
component: runtime | ||
command: "node run" | ||
command: "nodemon app.js" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app |
47 changes: 47 additions & 0 deletions
47
tests/examples/source/devfiles/nodejs/devfile-with-volumes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: test-devfile | ||
projects: | ||
- | ||
name: nodejs-web-app | ||
source: | ||
type: git | ||
location: "https://github.com/che-samples/web-nodejs-sample.git" | ||
components: | ||
- type: dockerimage | ||
image: quay.io/eclipse/che-nodejs10-ubi:nightly | ||
endpoints: | ||
- name: "3000/tcp" | ||
port: 3000 | ||
alias: runtime | ||
env: | ||
- name: FOO | ||
value: "bar" | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
volumes: | ||
- name: myvol | ||
containerPath: /data | ||
- type: dockerimage | ||
image: quay.io/eclipse/che-nodejs10-ubi:nightly | ||
alias: runtime2 | ||
memoryLimit: 1024Mi | ||
mountSources: false | ||
volumes: | ||
- name: myvol | ||
containerPath: /data | ||
- name: myvol2 | ||
containerPath: /data2 | ||
commands: | ||
- name: devbuild | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "echo hello >> myfile.log" | ||
workdir: /data | ||
- name: devrun | ||
actions: | ||
- type: exec | ||
component: runtime2 | ||
command: "cat myfile.log" | ||
workdir: /data |
28 changes: 28 additions & 0 deletions
28
tests/examples/source/devfiles/nodejs/devfile-without-devbuild.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: test-devfile | ||
projects: | ||
- | ||
name: nodejs-web-app | ||
source: | ||
type: git | ||
location: "https://github.com/che-samples/web-nodejs-sample.git" | ||
components: | ||
- type: dockerimage | ||
image: quay.io/eclipse/che-nodejs10-ubi:nightly | ||
endpoints: | ||
- name: "3000/tcp" | ||
port: 3000 | ||
alias: runtime | ||
env: | ||
- name: FOO | ||
value: "bar" | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
commands: | ||
- name: devrun | ||
actions: | ||
- type: exec | ||
component: runtime | ||
command: "npm install && nodemon app.js" | ||
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
apiVersion: 1.0.0 | ||
metadata: | ||
generateName: java-spring-boot | ||
projects: | ||
- | ||
name: springbootproject | ||
source: | ||
type: git | ||
location: "https://github.com/maysunfaisal/springboot.git" | ||
components: | ||
- | ||
type: chePlugin | ||
id: redhat/java/latest | ||
memoryLimit: 1512Mi | ||
- | ||
type: dockerimage | ||
image: maysunfaisal/springbootbuild | ||
alias: tools | ||
memoryLimit: 768Mi | ||
command: ['tail'] | ||
args: [ '-f', '/dev/null'] | ||
mountSources: true | ||
volumes: | ||
- name: springbootpvc | ||
containerPath: /data | ||
- | ||
type: dockerimage | ||
image: maysunfaisal/springbootruntime | ||
alias: runtime | ||
memoryLimit: 768Mi | ||
endpoints: | ||
- name: '8080/tcp' | ||
port: 8080 | ||
mountSources: false | ||
volumes: | ||
- name: springbootpvc | ||
containerPath: /data | ||
commands: | ||
- | ||
name: devBuild | ||
actions: | ||
- | ||
type: exec | ||
component: tools | ||
command: "/artifacts/bin/build-container-full.sh" | ||
workdir: /projects/springbootproject | ||
- | ||
name: devRun | ||
actions: | ||
- | ||
type: exec | ||
component: runtime | ||
command: "/artifacts/bin/start-server.sh" | ||
workdir: / |
Oops, something went wrong.