From 6c356dc1e76e0a58322136d3d7f4c92ce67cdd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Wed, 16 Oct 2024 13:15:38 +0100 Subject: [PATCH] WIP --- .../config_conversions/to_json_test.rb | 66 +++++++++++-------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/service/test/agama/storage/config_conversions/to_json_test.rb b/service/test/agama/storage/config_conversions/to_json_test.rb index b64aa8408a..53adbc2eee 100644 --- a/service/test/agama/storage/config_conversions/to_json_test.rb +++ b/service/test/agama/storage/config_conversions/to_json_test.rb @@ -350,14 +350,16 @@ config_json = config_proc.call(subject.convert) partitions_json = config_json[:partitions] - expect(partitions_json).to eq([ - { - size: { default: true } - }, - { - size: { default: true } - } - ]) + expect(partitions_json).to eq( + [ + { + size: { default: true } + }, + { + size: { default: true } + } + ] + ) end partition_proc = proc { |c| config_proc.call(c)[:partitions].first } @@ -725,11 +727,13 @@ it "generates the expected JSON" do vg_json = vg_proc.call(subject.convert) - expect(vg_json[:physicalVolumes]).to eq([ - "pv1", - "pv2", - { generate: ["disk1"] } - ]) + expect(vg_json[:physicalVolumes]).to eq( + [ + "pv1", + "pv2", + { generate: ["disk1"] } + ] + ) end context "and #physical_volumes_encryption is configured" do @@ -752,18 +756,20 @@ it "generates the expected JSON" do vg_json = vg_proc.call(subject.convert) - expect(vg_json[:physicalVolumes]).to eq([ - "pv1", - "pv2", - { - generate: { - targetDevices: ["disk1"], - encryption: { - luks1: { password: "12345" } - } - } - } - ]) + expect(vg_json[:physicalVolumes]).to eq( + [ + "pv1", + "pv2", + { + generate: { + targetDevices: ["disk1"], + encryption: { + luks1: { password: "12345" } + } + } + } + ] + ) end end end @@ -789,10 +795,12 @@ size: { default: true } } - expect(config_json[:logicalVolumes]).to eq([ - default_lv_json, - default_lv_json - ]) + expect(config_json[:logicalVolumes]).to eq( + [ + default_lv_json, + default_lv_json + ] + ) end lv_proc = proc { |c| vg_proc.call(c)[:logicalVolumes].first }