VOL-2086 unit tests for arouter.go;
Set exit status on errors
Change-Id: Ic395f454ed7e1d7ebc9b429b3c44cb0a2e785311
diff --git a/internal/pkg/afrouter/config.go b/internal/pkg/afrouter/config.go
index 5dccf32..c9bef79 100644
--- a/internal/pkg/afrouter/config.go
+++ b/internal/pkg/afrouter/config.go
@@ -40,6 +40,7 @@
config.LogLevel = cmdParse.Int("logLevel", 0, "The log level for the affinity router")
config.GrpcLog = cmdParse.Bool("grpclog", false, "Enable GRPC logging")
config.DisplayVersionOnly = cmdParse.Bool("version", false, "Print version information and exit")
+ config.DryRun = cmdParse.Bool("dry-run", false, "Verify config file, but exit before starting to serve requests")
err := cmdParse.Parse(os.Args[1:])
if err != nil {
@@ -65,6 +66,7 @@
LogLevel *int
GrpcLog *bool
DisplayVersionOnly *bool
+ DryRun *bool
Servers []ServerConfig `json:"servers"`
Ports PortConfig `json:"ports"`
ServerCertificates ServerCertConfig `json:"serverCertificates"`