mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
chore: make sure logging is set properly (#396)
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
parent
a0327ea574
commit
b45cddfc19
@ -22,9 +22,9 @@ func main() {
|
||||
logFlags := &log.Flags{}
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "manager [cmd]",
|
||||
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
|
||||
PersistentPreRun: func(cmd *cobra.Command, _ []string) {
|
||||
logFlags.ConfigureLogging()
|
||||
return nil
|
||||
cmd.SetContext(log.IntoContext(cmd.Context(), log.GetLogger()))
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cloudnative-pg/machinery/pkg/log"
|
||||
apimachineryTypes "k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
kustomizeTypes "sigs.k8s.io/kustomize/api/types"
|
||||
@ -118,7 +119,10 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte {
|
||||
}
|
||||
|
||||
return []byte{}
|
||||
}, func(_ []byte) {})
|
||||
}, func(_ []byte) {
|
||||
logFlags := &log.Flags{}
|
||||
logFlags.ConfigureLogging()
|
||||
})
|
||||
|
||||
// Run e2e tests using the Ginkgo runner.
|
||||
func TestE2E(t *testing.T) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user