Added test logfile param for testing
@@ -40,6 +40,7 @@ func (d *duration) Duration(t *testing.T) (duration time.Duration) {
type TestConfig struct {
TestParam bool
+ TestLogFile string
IntParam int
StringParam string
DurationParam duration
@@ -61,6 +62,13 @@ var (
Destination: &TestConfigValues.TestParam,
}
+ TestLogFileFlag = cli.StringFlag{
+ Name: "test.testlogfile",
+ Usage: "The file to log to",
+ Value: TestConfigValues.TestLogFile,
+ Destination: &TestConfigValues.TestLogFile,
+ }
+
IntParamFlag = altsrc.NewIntFlag(cli.IntFlag{
Name: "int-param",
Usage: "Test an int param",
@@ -146,6 +154,7 @@ func TestConfigLoading(t *testing.T) {
var appFlags = []cli.Flag{
TestFlag,
TestRunFlag,
+ TestLogFileFlag,
IntParamFlag,
StringParamFlag,
DurationParamFlag,
