Skip to content

Commit 6b5f695

Browse files
committed
Fix component spec parsing
1 parent daf4c8b commit 6b5f695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcontainers-dapr/src/main/java/io/dapr/testcontainers/DaprContainer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ public DaprContainer withComponent(Path path) {
210210
try {
211211
Map<String, Object> component = YAML_MAPPER.loadAs(Files.newInputStream(path), Map.class);
212212

213-
String type = (String) component.get("type");
214213
Map<String, Object> metadata = (Map<String, Object>) component.get("metadata");
215214
String name = (String) metadata.get("name");
216215

217216
Map<String, Object> spec = (Map<String, Object>) component.get("spec");
217+
String type = (String) spec.get("type");
218218
String version = (String) spec.get("version");
219219
List<Map<String, String>> specMetadata =
220220
(List<Map<String, String>>) spec.getOrDefault("metadata", Collections.emptyMap());

0 commit comments

Comments
 (0)