Commit Graph

3 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
f7089ba225
leases: add WithLabel
This adds a new WithLabel function, which allows to set a single label on
a lease, without having to first construct an intermediate map[string]string.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 21:03:40 +02:00
Sebastiaan van Stijn
1480e3bd4f
leases: cleanup TestWithLabels
- don't define a type, but just an ad-hoc struct
- use a single slice with test-cases; this allows IDE's to pick up the
  table as a test-table (which allows (re-)running individual tests)
- make use of testify's assert.Equal to compare the results, instead
  of a DIY loop over the expected values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 18:36:16 +02:00
Austin Vazquez
c4dee237f5 Fix order of operations when setting lease labels
Fixes an edge case where `WithLabels` would overwrite `WithExpiration`
on a lease when using client options.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-11-22 20:49:53 +00:00