17944: Fixes test. Avoids unnecessary Validate() call.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 9 Nov 2021 19:36:51 +0000 (16:36 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 9 Nov 2021 19:36:51 +0000 (16:36 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

lib/controller/handler_test.go
lib/controller/localdb/conn.go

index ac27b8ea509e59106e85cfbf58b2d2c8929f8e96..f854079f97d87376c9d6e3813b10b2872701d0f5 100644 (file)
@@ -183,7 +183,7 @@ func (s *HandlerSuite) TestVocabularyFailedCheckStatus(c *check.C) {
        err = json.Unmarshal(resp.Body.Bytes(), &jresp)
        c.Check(err, check.IsNil)
        c.Assert(len(jresp.Errors), check.Equals, 1)
-       c.Check(jresp.Errors[0], check.Matches, `.*tag value.*for key.*is not listed as valid.*`)
+       c.Check(jresp.Errors[0], check.Matches, `.*tag value.*is not valid for key.*`)
 }
 
 func (s *HandlerSuite) TestProxyDiscoveryDoc(c *check.C) {
index f515673154b60da2d1522371de0f98c6fb8c0e7d..86e3f371486ebce0cd5126a7dd12744ed4b23f5e 100644 (file)
@@ -107,10 +107,6 @@ func (conn *Conn) loadVocabularyFile() error {
        if err != nil {
                return fmt.Errorf("while loading vocabulary file %q: %s", conn.cluster.API.VocabularyPath, err)
        }
-       err = voc.Validate()
-       if err != nil {
-               return fmt.Errorf("while validating vocabulary file %q: %s", conn.cluster.API.VocabularyPath, err)
-       }
        conn.vocabularyCache = voc
        return nil
 }