Skip to content

Commit

Permalink
Update samples and tests for removing plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
  • Loading branch information
maysunfaisal committed Apr 6, 2021
1 parent 13683f3 commit b21137d
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 250 deletions.
4 changes: 2 additions & 2 deletions generator/schemas/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import (
// GenerateJSONSchema drives whether a Json schema should be generated from this GO Struct type
type GenerateJSONSchema struct {

// OmitCustomUnionMembers indicates that the Json schema gnerated from this type should omit Custom component union members.
// OmitCustomUnionMembers indicates that the Json schema generated from this type should omit Custom union members.
OmitCustomUnionMembers bool `marker:",optional"`

// OmitPluginUnionMembers indicates that the Json schema gnerated from this type should omit Plugin component union members.
// OmitPluginUnionMembers indicates that the Json schema generated from this type should omit Plugin component union members.
OmitPluginUnionMembers bool `marker:",optional"`

// Title indicates the content ot the Json Schema `title` attribute
Expand Down
4 changes: 2 additions & 2 deletions generator/schemas/zz_generated.markerhelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions samples/devfiles/job-apply-example.devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ components:
command: ["some", "command", "with", "parameters"]
restartPolicy: Never
backoffLimit: 4
- name: go-support
plugin:
id: ms-vscode/go/latest
- name: editor
plugin:
id: eclipse/che-theia/latest
commands:
- id: cleanup-job
apply:
Expand Down
13 changes: 0 additions & 13 deletions samples/devfiles/nodejs-stack.devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@ projects:
remotes:
origin: "https://github.com/che-samples/web-nodejs-sample.git"
components:
- name: editor
plugin:
id: eclipse/che-theia/7.1.0
- name: terminal
plugin:
id: eclipse/che-machine-exec-plugin/7.1.0
- name: typescript-plugin
plugin:
id: che-incubator/typescript/1.30.2
components:
- name: "somename"
container:
memoryLimit: 512Mi
- name: nodejs
container:
image: quay.io/eclipse/che-nodejs10-ubi:nightly
Expand Down
14 changes: 0 additions & 14 deletions samples/devfiles/sample-devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ projects:
revision: "main"
remote: origin
components:
- name: editor
attributes:
kjkh: "128M"
kjhkjh:
"": ""
plugin:
id: eclipse/che-theia/latest
- name: "ownplugin"
plugin:
id: acme/newPlugin/latest
registryUrl: "https://acme.com/registry/"
- name: "myplugin"
plugin:
uri: "https://github.com/johndoe/che-plugins/blob/master/cool-plugin/0.0.1/meta.yaml"
- name: "mycontainer"
container:
image: "busybox"
Expand Down
10 changes: 0 additions & 10 deletions samples/devfiles/simple-devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ events:
postStart:
- "build-schema-and-open-devfile"
components:
- name: yaml-support
plugin:
id: redhat/vscode-yaml/latest
- name: go-support
plugin:
id: ms-vscode/go/latest
- name: editor
plugin:
id: eclipse/che-theia/latest
registryUrl: "external-registry-url"
- name: "build-tools"
container:
image: some container image with required build tools
Expand Down
18 changes: 4 additions & 14 deletions samples/devfiles/spring-boot-http-booster-devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,7 @@ projects:
checkoutFrom:
revision: master
components:
- name: java-support
plugin:
id: redhat/java8/latest
components:
- name: vscode-java
container:
memoryLimit: 2Gi
- name: m2
volume:
size: 2G
- name: dependency-analytics
plugin:
id: redhat/dependency-analytics/latest
- name: maven-tooling
- name: maven
container:
image: registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.1
mountSources: true
Expand All @@ -45,6 +32,9 @@ components:
volumeMounts:
- name: m2
path: /home/jboss/.m2
- name: m2
volume:
size: 2G
commands:
- id: build
exec:
Expand Down
43 changes: 0 additions & 43 deletions test/v200/devfiles/components/pluginAll.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions test/v200/devfiles/components/pluginContainsPlugin.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions test/v200/devfiles/components/pluginIdAndKubernetes.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions test/v200/devfiles/components/pluginIdAndUri.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions test/v200/devfiles/components/pluginMinimum.yaml

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions test/v200/devfiles/components/pluginMixedCaseName.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions test/v200/devfiles/components/pluginNoName.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions test/v200/devfiles/components/pluginUriAndKubernetes.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions test/v200/json/component-parent-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,60 +231,6 @@
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/openshiftBothInlinedAndUri.yaml"]
},
{
"FileName" : "componentPluginAll.yaml",
"ExpectOutcome" : "PASS",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginAll.yaml"]
},
{
"FileName" : "componentPluginMinimum.yaml",
"ExpectOutcome" : "PASS",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMinimum.yaml"]
},
{
"FileName" : "componentPluginNoName.yaml",
"ExpectOutcome" : "missing properties: \"name\"",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginNoName.yaml"]
},
{
"FileName" : "componentPluginMixedCaseName.yaml",
"ExpectOutcome" : "does not match pattern",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMixedCaseName.yaml"]
},
{
"FileName" : "componentPluginContainsPlugin.yaml",
"ExpectOutcome" : "oneOf failed",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginContainsPlugin.yaml"]
},
{
"FileName" : "componentPluginIdAndKubernetes.yaml",
"ExpectOutcome" : "valid against schemas at indexes 1 and 2",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginIdAndKubernetes.yaml"]
},
{
"FileName" : "componentPluginIdAndUri.yaml",
"ExpectOutcome" : "valid against schemas at indexes 0 and 1",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginIdAndUri.yaml"]
},
{
"FileName" : "componentPluginUriAndKubernetes.yaml",
"ExpectOutcome" : "valid against schemas at indexes 0 and 2",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginUriAndKubernetes.yaml"]
},
{
"FileName" : "componentPluginMissingIdUriAndKubernetes.yaml",
"ExpectOutcome" : "oneOf failed",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMissingIdUriAndKubernetes.yaml"]
},
{
"FileName" : "componentVolumeAll",
"ExpectOutcome" : "PASS",
Expand Down
54 changes: 0 additions & 54 deletions test/v200/json/component-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,60 +261,6 @@
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/openshiftBothInlinedAndUri.yaml"]
},
{
"FileName" : "componentPluginAll.yaml",
"ExpectOutcome" : "PASS",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginAll.yaml"]
},
{
"FileName" : "componentPluginMinimum.yaml",
"ExpectOutcome" : "PASS",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMinimum.yaml"]
},
{
"FileName" : "componentPluginNoName.yaml",
"ExpectOutcome" : "missing properties: \"name\"",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginNoName.yaml"]
},
{
"FileName" : "componentPluginMixedCaseName.yaml",
"ExpectOutcome" : "does not match pattern",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMixedCaseName.yaml"]
},
{
"FileName" : "componentPluginContainsPlugin.yaml",
"ExpectOutcome" : "oneOf failed",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginContainsPlugin.yaml"]
},
{
"FileName" : "componentPluginIdAndKubernetes.yaml",
"ExpectOutcome" : "valid against schemas at indexes 1 and 2",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginIdAndKubernetes.yaml"]
},
{
"FileName" : "componentPluginIdAndUri.yaml",
"ExpectOutcome" : "valid against schemas at indexes 0 and 1",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginIdAndUri.yaml"]
},
{
"FileName" : "componentPluginUriAndKubernetes.yaml",
"ExpectOutcome" : "valid against schemas at indexes 0 and 2",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginUriAndKubernetes.yaml"]
},
{
"FileName" : "componentPluginMissingIdUriAndKubernetes.yaml",
"ExpectOutcome" : "oneOf failed",
"Files": ["devfiles/components/componentStart.yaml",
"devfiles/components/pluginMissingIdUriAndKubernetes.yaml"]
},
{
"FileName" : "componentVolumeAll",
"ExpectOutcome" : "PASS",
Expand Down

0 comments on commit b21137d

Please sign in to comment.