Test04Compatibility tests if a configuration file for ContainerSSH version 0.4 can be read.
(t *testing.T)
| 15 | |
| 16 | // Test04Compatibility tests if a configuration file for ContainerSSH version 0.4 can be read. |
| 17 | func Test04Compatibility(t *testing.T) { |
| 18 | logger := log.NewTestLogger(t) |
| 19 | |
| 20 | logger.Info(message.NewMessage("TEST", "FYI: any deprecation notices in this test are intentional.")) |
| 21 | |
| 22 | testFile, err := os.Open("_testdata/0.4.yaml") |
| 23 | assert.NoError(t, err) |
| 24 | reader, err := config.NewReaderLoader( |
| 25 | testFile, |
| 26 | logger, |
| 27 | config.FormatYAML, |
| 28 | ) |
| 29 | assert.NoError(t, err) |
| 30 | |
| 31 | cfg := configuration.AppConfig{} |
| 32 | structutils.Defaults(&cfg) |
| 33 | err = reader.Load(context.Background(), &cfg) |
| 34 | assert.NoError(t, err) |
| 35 | err = cfg.Validate(false) |
| 36 | assert.NoError(t, err) |
| 37 | } |
nothing calls this directly
no test coverage detected