feat: --demo stars platform-prod for alice too, and api-key expires soon
This commit is contained in:
3 files changed
+20
-2
No files matched your search
@@ -218,6 +218,19 @@ func (p *Provider) addContainer(src provider.Source, name, detail string, types
|
||||
return c
|
||||
}
|
||||
|
||||
// Expire sets when the object name in vault expires, for --demo: a date
|
||||
// relative to today in the test data would change the tests' screenshots
|
||||
// from day to day.
|
||||
func (p *Provider) Expire(vault, name string, at time.Time) {
|
||||
for _, objs := range p.objects {
|
||||
for i := range objs {
|
||||
if objs[i].Container.Name == vault && objs[i].Name == name {
|
||||
objs[i].Expires = at
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Provider) add(c provider.Container, t provider.ObjectType, o provider.Object, value string) provider.Object {
|
||||
o.Container = c
|
||||
o.Type = t
|
||||
|
||||
Reference in new issue
Block a user