Commit Graph

10 Commits

Author SHA1 Message Date
Karl Isenberg 242b6aa83e fix: Don't panic when ObjMetadata is invalid
- UnstructuredToObjMetaOrDie -> UnstructuredToObjMetadata
- UnstructuredToObjMeta -> UnstructuredToObjectMetadata
- UnstructuredsToObjMetasOrDie -> UnstructuredSetToObjMetadataSet
- UnstructuredsToObjMetas -> UnstructuredSetToObjMetadataSet
- Remove CreateObjMetadata (Validator performs validation)
2022-01-07 18:50:30 -08:00
Karl Isenberg d83ce93efd Add ObjMetadataSet to encapsulate set functions
- Refactor usages of []ObjMetadata to use ObjMetadataSet
- Move Union, Diff, Contains, Hash, Remove, and Equal into
  ObjMetadataSet
- Add ToStringMap and FromStringMap for inventory serialization
2021-10-06 14:25:12 -07:00
Mikhail Mazurskiy 4b8dd62c53
Remove strings.TrimSpace()
Names and labels cannot have any whitespace. If they do, it's an error that should be reported and fixed.
2021-08-08 11:29:43 +10:00
Sean Sullivan 5af6137d68 Remove special-case object name validation 2021-02-02 10:31:53 -08:00
Sean Sullivan 9d0ec2cd71 Allow colon in the name of RBAC resources 2020-08-19 12:14:28 -07:00
Sean R. Sullivan c9e7d329da Updates prune algorithm to use one inventory object 2020-07-29 18:33:49 -07:00
Christoph Glaubitz 3757e60840 Added parsing to objmetadata_test.TestCreateObjMetadata
This commit extends TestCreateObjMetadata. The test function does not
just verify CreateObjMetadata, but also uses ParseObjMetadata to verify
back and forth between both functions. I left specific testing of
ParseObjMetadata in place, because there might be edge cases, that
should be tested on its own.

I'm aware, that the TestCreateObjMetadata now tests two things, but I
think it makes life of maintainers and new contributors far easier.
E.g. the change I introduced in #193 would have been catched by tests,
rather than someone with a mental model of all of the code.
2020-07-15 10:52:13 +02:00
Sean Sullivan 2f6a1ef017 Validates resource names before storing in inventory 2020-07-14 14:18:56 -07:00
Sean R. Sullivan 52db385b3c Updates prune to use UID instead of ObjMetadata 2020-04-08 10:11:34 -07:00
Morten Torkildsen c58fbb8623 Move ObjMetadata into a separate package 2020-03-09 09:31:20 -07:00