mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 19:54:00 +00:00
Pass Velero server command args to the plugins Fixes #7806 Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
20 lines
423 B
Go
20 lines
423 B
Go
package config
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/spf13/pflag"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetDefaultConfig(t *testing.T) {
|
|
config := GetDefaultConfig()
|
|
assert.Equal(t, "info", config.MaintenanceCfg.LogLevelFlag.String())
|
|
}
|
|
|
|
func TestBindFlags(t *testing.T) {
|
|
config := GetDefaultConfig()
|
|
config.BindFlags(pflag.CommandLine)
|
|
assert.Equal(t, "info", config.MaintenanceCfg.LogLevelFlag.String())
|
|
}
|