Don not pring package info in grep

This commit is contained in:
Phani Teja Marupaka
2020-09-15 00:15:52 -07:00
parent 00f0fd7109
commit cea2986574
3 changed files with 10 additions and 12 deletions

View File

@@ -283,8 +283,7 @@ func TestGrepSubPackages(t *testing.T) {
name: "grep-recurse-subpackages",
dataset: "dataset-without-setters",
args: []string{"kind=Deployment"},
expected: `${baseDir}/mysql/
# Copyright 2019 The Kubernetes Authors.
expected: `# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
@@ -302,8 +301,7 @@ spec:
containers:
- name: mysql
image: mysql:1.7.9
${baseDir}/mysql/storage/
---
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
@@ -322,15 +320,14 @@ spec:
containers:
- name: storage
image: storage:1.7.7
`,
---`,
},
{
name: "grep-top-level-pkg-no-recurse-subpackages",
dataset: "dataset-without-setters",
args: []string{"kind=Deployment", "-R=false"},
packagePath: "mysql",
expected: `${baseDir}/mysql/
# Copyright 2019 The Kubernetes Authors.
expected: `# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
@@ -348,15 +345,14 @@ spec:
containers:
- name: mysql
image: mysql:1.7.9
`,
---`,
},
{
name: "grep-nested-pkg-no-recurse-subpackages",
dataset: "dataset-without-setters",
packagePath: "mysql/storage",
args: []string{"kind=Deployment", "-R=false"},
expected: `${baseDir}/mysql/storage/
# Copyright 2019 The Kubernetes Authors.
expected: `# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
@@ -374,7 +370,7 @@ spec:
containers:
- name: storage
image: storage:1.7.7
`,
---`,
},
}
for i := range tests {