mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(ecs): emit empty arrays for empty mountPoints and volumesFrom (#9015)
* fix(ecs): emit empty arrays for empty mountPoints and volumesFrom * test(ecs): an omitted volumesFrom reads back as [] too
This commit is contained in:
1 parent
c1e7b240ea
commit
dca36665b5
3 files changed
+52
-4
No files matched your search
@@ -295,7 +295,7 @@ public class EcsResponseWriter {
|
||||
if (def.getSecrets() != null && !def.getSecrets().isEmpty()) {
|
||||
n.set("secrets", secretsNode(def.getSecrets()));
|
||||
}
|
||||
if (def.getMountPoints() != null && !def.getMountPoints().isEmpty()) {
|
||||
if (def.getMountPoints() != null) {
|
||||
ArrayNode mps = objectMapper.createArrayNode();
|
||||
for (MountPoint mp : def.getMountPoints()) {
|
||||
ObjectNode mpNode = objectMapper.createObjectNode();
|
||||
@@ -306,7 +306,7 @@ public class EcsResponseWriter {
|
||||
}
|
||||
n.set("mountPoints", mps);
|
||||
}
|
||||
if (def.getVolumesFrom() != null && !def.getVolumesFrom().isEmpty()) {
|
||||
if (def.getVolumesFrom() != null) {
|
||||
ArrayNode volumesFrom = objectMapper.createArrayNode();
|
||||
for (VolumeFrom volumeFrom : def.getVolumesFrom()) {
|
||||
ObjectNode volumeFromNode = objectMapper.createObjectNode();
|
||||
|
||||
Reference in new issue
Block a user