feat: vaults, scopes and files show their details: a vault's settings, who has a scope, a file's keys and git status
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9b0329e9da
commit
5381cf5d43
14 files changed
+474
-2
No files matched your search
@@ -1236,3 +1236,22 @@ func TestStatusPane(t *testing.T) {
|
||||
t.Errorf("back to %v", d.m.focus)
|
||||
}
|
||||
}
|
||||
|
||||
// detailed is an account whose vaults have details.
|
||||
type detailed struct{ provider.Provider }
|
||||
|
||||
func (detailed) Details(_ context.Context, c provider.Container) ([]provider.Attr, error) {
|
||||
return []provider.Attr{{Label: "access", Value: "Azure roles (RBAC)"}, {Label: "git", Value: "tracked", Warn: true}}, nil
|
||||
}
|
||||
|
||||
func TestContainerDetails(t *testing.T) {
|
||||
t.Parallel()
|
||||
d := newDriverOpts(t, Options{}, detailed{fake.Azure(0)})
|
||||
d.keys("2")
|
||||
if scr := d.screen(); !strings.Contains(scr, "access Azure roles (RBAC)") || !strings.Contains(scr, "URI") {
|
||||
t.Errorf("details:\n%s", scr)
|
||||
}
|
||||
if st := d.m.details[d.m.containers.SelectedID()]; st.loading || len(st.attrs) != 2 {
|
||||
t.Errorf("state %+v", st)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user