(t *testing.T)
| 1642 | } |
| 1643 | |
| 1644 | func TestWrongDirsSearchNotFound(t *testing.T) { |
| 1645 | _, config := initDirs(t) |
| 1646 | |
| 1647 | v := New() |
| 1648 | v.SetConfigName(config) |
| 1649 | v.SetDefault(`key`, `default`) |
| 1650 | |
| 1651 | v.AddConfigPath(`whattayoutalkingbout`) |
| 1652 | v.AddConfigPath(`thispathaintthere`) |
| 1653 | |
| 1654 | err := v.ReadInConfig() |
| 1655 | assert.IsType(t, ConfigFileNotFoundError{"", ""}, err) |
| 1656 | |
| 1657 | // Even though config did not load and the error might have |
| 1658 | // been ignored by the client, the default still loads |
| 1659 | assert.Equal(t, `default`, v.GetString(`key`)) |
| 1660 | } |
| 1661 | |
| 1662 | func TestWrongDirsSearchNotFoundForMerge(t *testing.T) { |
| 1663 | _, config := initDirs(t) |
nothing calls this directly
no test coverage detected