Skip to content

Commit

Permalink
feat(check): skip Others format validate (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-cj authored Dec 15, 2020
1 parent 3d37e45 commit 92e4a8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pkg/model/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func (f Format) ValidateDirectory(rootPath string) error {
err = f.validateForXGBoost(modelFilePath, fileList)
case FormatMLflow:
err = f.validateForMLflow(modelFilePath, fileList)
case FormatOthers:
return nil
default:
err = errors.New("unrecognized model format, please check the ormbfile.yaml")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ var _ = Describe("Format", func() {
Expect(err).To(BeNil())
})

It("Should validate fail for corruptted format", func() {
It("Should validate Others for corruptted format successfully", func() {
others := model.FormatOthers
err := others.ValidateDirectory("../../test/Corrupt")
Expect(err).Should(HaveOccurred())
Expect(err).Should(BeNil())
})
})

0 comments on commit 92e4a8d

Please sign in to comment.