report listener and storage types as found keys (#15383)

* report listener and storage types as found keys

* changelog
This commit is contained in:
Hridoy Roy
2022-05-12 09:04:56 -07:00
committed by GitHub
parent 56fb894934
commit 79df79f892
6 changed files with 41 additions and 0 deletions

View File

@@ -525,6 +525,16 @@ func testUnknownFieldValidation(t *testing.T) {
}
}
func testUnknownFieldValidationStorageAndListener(t *testing.T) {
config, err := LoadConfigFile("./test-fixtures/storage-listener-config.json")
if err != nil {
t.Fatalf("err: %s", err)
}
if len(config.UnusedKeys) != 0 {
t.Fatalf("unused keys for valid config are %+v\n", config.UnusedKeys)
}
}
func testLoadConfigFile_json(t *testing.T) {
config, err := LoadConfigFile("./test-fixtures/config.hcl.json")
if err != nil {