X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5865e0ce5d98d68b71d1e4e146dcbecd35f1b296..98cfc0a3924a16654150899afbb7fd255439cec3:/sdk/go/arvados/vocabulary_test.go diff --git a/sdk/go/arvados/vocabulary_test.go b/sdk/go/arvados/vocabulary_test.go index c9e9d7b0df..af62833a31 100644 --- a/sdk/go/arvados/vocabulary_test.go +++ b/sdk/go/arvados/vocabulary_test.go @@ -231,6 +231,7 @@ func (s *VocabularySuite) TestNewVocabulary(c *check.C) { &Vocabulary{ reservedTagKeys: map[string]bool{ "container_request": true, + "container_uuid": true, "cwl_input": true, "cwl_output": true, "docker-image-repo-tag": true, @@ -300,6 +301,37 @@ func (s *VocabularySuite) TestNewVocabulary(c *check.C) { } } +func (s *VocabularySuite) TestValidSystemProperties(c *check.C) { + s.testVoc.StrictTags = true + properties := map[string]interface{}{ + "arv:gitBranch": "main", + "arv:OK": true, + "arv:cost": 123, + } + c.Check(s.testVoc.Check(properties), check.IsNil) +} + +func (s *VocabularySuite) TestSystemPropertiesPrefixTypo(c *check.C) { + s.testVoc.StrictTags = true + for _, key := range []string{ + // Extra characters in prefix + "arv :foo", + " arv:foo", + // Wrong punctuation + "arv.foo", + "arv-foo", + "arv_foo", + // Wrong case + "Arv:foo", + // Wrong word + "arvados", + "arvados:foo", + } { + properties := map[string]interface{}{key: "value"} + c.Check(s.testVoc.Check(properties), check.NotNil) + } +} + func (s *VocabularySuite) TestValidationErrors(c *check.C) { tests := []struct { name string