-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for 'odo dev' when a project with no source code is use…
…d with no 'metadata.name' in the Devfile The rationale behind this is to purposely make the Alizer library unable to detect the project. Per the requirements, this would force us to use the project directory name as component name. This highlights an interesting behavior if the project directory name is all-numeric (as is the case in our tests); our sanitization logic automatically prepends an "x" prefix to the directory name, so it can be used as a valid name for the component.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
tests/examples/source/devfiles/nodejs/devfile-no-metadata-name.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,49 @@ | ||
schemaVersion: 2.0.0 | ||
metadata: | ||
projectType: nodejs | ||
language: nodejs | ||
starterProjects: | ||
- name: nodejs-starter | ||
git: | ||
remotes: | ||
origin: "https://github.com/odo-devfiles/nodejs-ex.git" | ||
components: | ||
- name: runtime | ||
container: | ||
image: registry.access.redhat.com/ubi8/nodejs-12:1-36 | ||
memoryLimit: 1024Mi | ||
endpoints: | ||
- name: "3000-tcp" | ||
targetPort: 3000 | ||
mountSources: true | ||
commands: | ||
- id: devbuild | ||
exec: | ||
component: runtime | ||
commandLine: npm install | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: build | ||
isDefault: true | ||
- id: build | ||
exec: | ||
component: runtime | ||
commandLine: npm install | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: build | ||
- id: devrun | ||
exec: | ||
component: runtime | ||
commandLine: npm start | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: run | ||
isDefault: true | ||
- id: run | ||
exec: | ||
component: runtime | ||
commandLine: npm start | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: run |
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