Commit graph

11 commits

Author SHA1 Message Date
John Howard
1fbaf6ee8b Windows CI: Fix unit test failures
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-11 19:31:08 -08:00
Tibor Vass
1c0474ed63 Merge pull request #20476 from wenchma/19425-TestDaemonStartWithDaemonCommand
Optimize slow bottleneck tests of TestDaemonStartWithDaemonCommand
2016-03-11 10:54:48 -05:00
David Calavera
59586d02b1 Move registry service options to the daemon configuration.
Allowing to set their values in the daemon configuration file.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-10 11:53:11 -05:00
Wen Cheng Ma
b9ef2682b9 Optimize slow bottleneck tests of TestDaemonStartWithDaemonCommand
* Remvoe integration test of TestDaemonStartWithDaemonCommand
* Rewrite as unit test

Related issue #19425

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-01 14:05:39 +08:00
Darren Stahl
957792e485 Windows CI: Unit Test move Unix specific struct field tests to _unix.go
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-29 18:04:06 -08:00
David Calavera
31cb96dcfa Avoid setting default truthy values from flags that are not set.
When the value for a configuration option in the file is `false`,
and the default value for a flag is `true`, we should not
take the value from the later as final value for the option,
because the user explicitly set `false`.

This change overrides the default value in the flagSet with
the value in the configuration file so we get the correct
result when we merge the two configurations together.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-19 18:39:10 -05:00
David Calavera
b6766e3063 Make sure flat options are not parsed as config structures.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-02 14:45:37 -05:00
David Calavera
5e80ac0dd1 Make TLSOptions and LogConfig embedded structs.
That way the configuration file becomes flag, without extra keys.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-22 13:20:17 -05:00
David Calavera
ed4038676f Verify that the configuration keys in the file are valid.
- Return an error if any of the keys don't match valid flags.
- Fix an issue ignoring merged values as named values.
- Fix tlsverify configuration key.
- Fix bug in mflag to avoid panics when one of the flag set doesn't have any flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-21 16:56:12 -05:00
David Calavera
cd3446972e Fix post config verification without flags.
- Set the daemon log level to what's set in the configuration.
- Enable TLS when TLSVerify is enabled.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-20 13:01:07 -05:00
David Calavera
677a6b3506 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-14 16:44:37 -05:00