add e2e tests for v1 config (#3608)

This commit is contained in:
fatedier
2023-09-13 16:32:39 +08:00
committed by GitHub
parent c95311d1a0
commit 7cd02f5bd8
61 changed files with 3697 additions and 159 deletions

View File

@ -108,7 +108,8 @@ var rootCmd = &cobra.Command{
if cfgFile != "" {
svrCfg, isLegacyFormat, err = config.LoadServerConfig(cfgFile)
if err != nil {
return err
fmt.Println(err)
os.Exit(1)
}
if isLegacyFormat {
fmt.Printf("WARNING: ini format is deprecated and the support will be removed in the future, " +
@ -116,7 +117,8 @@ var rootCmd = &cobra.Command{
}
} else {
if svrCfg, err = parseServerConfigFromCmd(); err != nil {
return err
fmt.Println(err)
os.Exit(1)
}
}
@ -125,7 +127,8 @@ var rootCmd = &cobra.Command{
fmt.Printf("WARNING: %v\n", warning)
}
if err != nil {
return err
fmt.Println(err)
os.Exit(1)
}
if err := runServer(svrCfg); err != nil {
@ -168,7 +171,7 @@ func parseServerConfigFromCmd() (*v1.ServerConfig, error) {
cfg.Log.MaxDays = logMaxDays
cfg.Log.DisablePrintColor = disableLogColor
cfg.SubDomainHost = subDomainHost
cfg.TLS.Force = tlsOnly
cfg.Transport.TLS.Force = tlsOnly
cfg.MaxPortsPerClient = maxPortsPerClient
// Only token authentication is supported in cmd mode