-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more test cases to check the priority order when searching for de…
…fault devfiles Signed-off-by: Armel Soro <asoro@redhat.com>
- Loading branch information
Showing
7 changed files
with
287 additions
and
0 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
pkg/devfile/testdata/priority-for-devfile_yml/.devfile.yml
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 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
image: busybox:latest | ||
command: [tail] | ||
args: [ -f, /dev/null ] | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Test stack (Busybox) | ||
displayName: Test stack (.devfile.yml) | ||
name: my-test-app | ||
version: 0.1.0 | ||
schemaVersion: 2.2.0 |
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 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
image: busybox:latest | ||
command: [tail] | ||
args: [ -f, /dev/null ] | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Test stack (Busybox) | ||
displayName: Test stack (devfile.yml) | ||
name: my-test-app | ||
version: 0.1.0 | ||
schemaVersion: 2.2.0 |
35 changes: 35 additions & 0 deletions
35
pkg/devfile/testdata/priority-for-dot_devfile_yaml/.devfile.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,35 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
endpoints: | ||
- name: http | ||
targetPort: 8080 | ||
image: golang:latest | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Stack with the latest Go version | ||
displayName: Go Runtime (.devfile.yaml) | ||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg | ||
language: go | ||
name: my-go-app | ||
projectType: go | ||
tags: | ||
- Go | ||
version: 1.0.0 | ||
schemaVersion: 2.2.0 |
28 changes: 28 additions & 0 deletions
28
pkg/devfile/testdata/priority-for-dot_devfile_yaml/.devfile.yml
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 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
image: busybox:latest | ||
command: [tail] | ||
args: [ -f, /dev/null ] | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Test stack (Busybox) | ||
displayName: Test stack (.devfile.yml) | ||
name: my-test-app | ||
version: 0.1.0 | ||
schemaVersion: 2.2.0 |
28 changes: 28 additions & 0 deletions
28
pkg/devfile/testdata/priority-for-dot_devfile_yaml/devfile.yml
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 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
image: busybox:latest | ||
command: [tail] | ||
args: [ -f, /dev/null ] | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Test stack (Busybox) | ||
displayName: Test stack (devfile.yml) | ||
name: my-test-app | ||
version: 0.1.0 | ||
schemaVersion: 2.2.0 |
28 changes: 28 additions & 0 deletions
28
pkg/devfile/testdata/priority-for-dot_devfile_yml/.devfile.yml
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 @@ | ||
commands: | ||
- exec: | ||
commandLine: ./main {{ PARAMS }} | ||
component: runtime | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
components: | ||
- container: | ||
image: busybox:latest | ||
command: [tail] | ||
args: [ -f, /dev/null ] | ||
mountSources: true | ||
name: runtime | ||
- kubernetes: | ||
uri: http://127.0.0.1:8080/outerloop-deploy.yaml | ||
name: outerloop-deploy | ||
- openshift: | ||
uri: http://127.0.0.1:8080/outerloop-service.yaml | ||
name: outerloop-deploy2 | ||
metadata: | ||
description: Test stack (Busybox) | ||
displayName: Test stack (.devfile.yml) | ||
name: my-test-app | ||
version: 0.1.0 | ||
schemaVersion: 2.2.0 |