feat(secrets): implement SecretStore interface and StaticStore/LocalStore for credential management

This commit is contained in:
Alex Lovell-Troy 2025-03-07 17:10:31 -05:00 committed by David Allen
parent ccce61694b
commit ee1fc327e2
Signed by: towk
GPG key ID: 0430CDBE22619155
13 changed files with 531 additions and 34 deletions

View file

@ -14,8 +14,9 @@ import (
"net/http"
"testing"
"github.com/davidallendj/magellan/pkg/client"
"github.com/davidallendj/magellan/pkg/crawler"
"github.com/OpenCHAMI/magellan/pkg/client"
"github.com/OpenCHAMI/magellan/pkg/crawler"
"github.com/OpenCHAMI/magellan/pkg/secrets"
)
var (
@ -126,12 +127,17 @@ func TestExpectedOutput(t *testing.T) {
t.Fatalf("failed while waiting for emulator: %v", err)
}
// initialize a credential store
staticStore := &secrets.StaticStore{
Username: *username,
Password: *password,
}
systems, err := crawler.CrawlBMCForSystems(
crawler.CrawlerConfig{
URI: *host,
Username: *username,
Password: *password,
Insecure: true,
URI: *host,
CredentialStore: staticStore,
Insecure: true,
},
)