refact: cscli papi (#3222)

* cscli papi status - fix nil deref + func test

* cscli papi: extract methods status(), sync()

* papi status -> stdout

* fix nil deref

* cscli support dump: include papi status

* lint
This commit is contained in:
mmetc 2024-09-10 17:32:13 +02:00 committed by GitHub
parent c8750f604c
commit 4d10e9df00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 131 additions and 68 deletions

View file

@ -34,6 +34,14 @@ func CAPI(c *csconfig.Config) error {
}
func PAPI(c *csconfig.Config) error {
if err := CAPI(c); err != nil {
return err
}
if err := CAPIRegistered(c); err != nil {
return err
}
if c.API.Server.OnlineClient.Credentials.PapiURL == "" {
return errors.New("no PAPI URL in configuration")
}