Skip to content

Commit 1d470ab

Browse files
Merge pull request #28440 from ardaguclu/oc-process-filename-ns
NO-JIRA: Add test case for namespaced filename in oc process
2 parents 4205f21 + 979c432 commit 1d470ab

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

test/extended/cli/template.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var _ = g.Describe("[sig-cli] templates", func() {
2525
appTemplateStiPath = filepath.Join(testDataPath, "application-template-stibuild.json")
2626
guestbookTemplatePath = filepath.Join(testDataPath, "templates", "guestbook.json")
2727
guestbookTemplateEnvPath = filepath.Join(testDataPath, "templates", "guestbook.env")
28+
templateWithCRDNSPath = filepath.Join(testDataPath, "new-app", "template-with-crd-ns.yaml")
2829
templateRequiredParamPath = filepath.Join(testDataPath, "templates", "template_required_params.yaml")
2930
templateRequiredParamEnvPath = filepath.Join(testDataPath, "templates", "template_required_params.env")
3031
templateTypePrecisionPath = filepath.Join(testDataPath, "templates", "template-type-precision.json")
@@ -45,6 +46,8 @@ var _ = g.Describe("[sig-cli] templates", func() {
4546
o.Expect(err).NotTo(o.HaveOccurred())
4647
err = oc.WithoutNamespace().Run("process").Args("-f", outputYamlFile).Execute()
4748
o.Expect(err).NotTo(o.HaveOccurred())
49+
err = oc.WithoutNamespace().Run("process").Args("-f", templateWithCRDNSPath).Execute()
50+
o.Expect(err).NotTo(o.HaveOccurred())
4851
err = oc.Run("process").Args("ruby-helloworld-sample").Execute()
4952
o.Expect(err).NotTo(o.HaveOccurred())
5053
out, err := oc.Run("process").Args("ruby-helloworld-sample", "-o", "template", "--template", "{{.kind}}").Output()

test/extended/testdata/bindata.go

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: template.openshift.io/v1
2+
kind: Template
3+
metadata:
4+
name: template-with-crd
5+
namespace: openshift
6+
objects:
7+
- kind: CustomResourceDefinition
8+
apiVersion: apiextensions.k8s.io/v1
9+
metadata:
10+
name: template-with-crd-ns

0 commit comments

Comments
 (0)