Skip to content

Commit 322997e

Browse files
committed
test: Init with KEP metadata test from cmd/kepval
Signed-off-by: Stephen Augustus <[email protected]>
1 parent aed343d commit 322997e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

hack/verify-kep-metadata.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
2323
cd "${ROOT}"
2424

2525
# run the tests
26-
GO111MODULE=on go test ./cmd/kepval/...
26+
GO111MODULE=on go test ./test/metadata_test.go

test/OWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
approvers:
4+
- kep-tools-approvers
5+
reviewers:
6+
- kep-tools-reviewers
7+
8+
labels:
9+
- area/enhancements

cmd/kepval/main_test.go renamed to test/metadata_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package test
1818

1919
import (
2020
"os"
@@ -37,7 +37,7 @@ func TestValidation(t *testing.T) {
3737
// Find all the keps
3838
files := []string{}
3939
err := filepath.Walk(
40-
filepath.Join("..", "..", kepsDir),
40+
filepath.Join("..", kepsDir),
4141
func(path string, info os.FileInfo, err error) error {
4242
if err != nil {
4343
return err
@@ -148,7 +148,7 @@ func TestValidation(t *testing.T) {
148148
// TODO: Is this a duplicate of the package function?
149149
// ignore certain files in the keps/ subdirectory
150150
func ignore(dir, name string) bool {
151-
if dir == "../../keps/NNNN-kep-template" {
151+
if dir == "../keps/NNNN-kep-template" {
152152
return true // ignore the template directory because its metadata file does not use a valid sig name
153153
}
154154

0 commit comments

Comments
 (0)