(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestGetOrDefaultNonExistentHostSpecificKey(t *testing.T) { |
| 79 | // Given have no top level configuration |
| 80 | cfg := newTestConfig() |
| 81 | |
| 82 | // When we get a key for a host that has no value |
| 83 | optionalEntry := cfg.GetOrDefault("non-existent-host", "non-existent-key") |
| 84 | |
| 85 | // Then it returns a None variant |
| 86 | require.True(t, optionalEntry.IsNone(), "expected there to be no value") |
| 87 | } |
| 88 | |
| 89 | func TestGetOrDefaultExistingTopLevelKey(t *testing.T) { |
| 90 | // Given have a top level config entry |
nothing calls this directly
no test coverage detected