regulators: Add inventory path to Chassis class

A previous commit added the "inventory_path" property to the "chassis"
object in the JSON configuration file.

This commit adds that new property to the C++ implementation:
* Chassis class and associated gtests
* JSON configuration file parser functions and associated gtests
* Other gtests affected by the change to the Chassis constructor

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I7406f874263d01e6faa2b8c333cb1baf915cf2ac
diff --git a/phosphor-regulators/test/chassis_tests.cpp b/phosphor-regulators/test/chassis_tests.cpp
index 36042d4..c04e917 100644
--- a/phosphor-regulators/test/chassis_tests.cpp
+++ b/phosphor-regulators/test/chassis_tests.cpp
@@ -46,12 +46,17 @@
 using ::testing::Return;
 using ::testing::TypedEq;
 
+// Default chassis inventory path
+static const std::string defaultInventoryPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(ChassisTests, Constructor)
 {
     // Test where works: Only required parameters are specified
     {
-        Chassis chassis{2};
+        Chassis chassis{2, defaultInventoryPath};
         EXPECT_EQ(chassis.getNumber(), 2);
+        EXPECT_EQ(chassis.getInventoryPath(), defaultInventoryPath);
         EXPECT_EQ(chassis.getDevices().size(), 0);
     }
 
@@ -63,15 +68,16 @@
         devices.emplace_back(createDevice("vdd_reg2"));
 
         // Create Chassis
-        Chassis chassis{1, std::move(devices)};
+        Chassis chassis{1, defaultInventoryPath, std::move(devices)};
         EXPECT_EQ(chassis.getNumber(), 1);
+        EXPECT_EQ(chassis.getInventoryPath(), defaultInventoryPath);
         EXPECT_EQ(chassis.getDevices().size(), 2);
     }
 
     // Test where fails: Invalid chassis number < 1
     try
     {
-        Chassis chassis{0};
+        Chassis chassis{0, defaultInventoryPath};
         ADD_FAILURE() << "Should not have reached this line.";
     }
     catch (const std::invalid_argument& e)
@@ -93,7 +99,7 @@
     devices.emplace_back(createDevice("reg3"));
 
     // Create Chassis
-    Chassis chassis{1, std::move(devices)};
+    Chassis chassis{1, defaultInventoryPath, std::move(devices)};
 
     // Add Device and Rail objects within the Chassis to an IDMap
     IDMap idMap{};
@@ -132,7 +138,7 @@
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
     std::unique_ptr<Chassis> chassis =
-        std::make_unique<Chassis>(1, std::move(devices));
+        std::make_unique<Chassis>(1, defaultInventoryPath, std::move(devices));
     Chassis* chassisPtr = chassis.get();
 
     // Create System that contains Chassis
@@ -163,7 +169,7 @@
         EXPECT_CALL(journal, logDebug("Closing devices in chassis 2")).Times(1);
 
         // Create Chassis
-        Chassis chassis{2};
+        Chassis chassis{2, defaultInventoryPath};
 
         // Call closeDevices()
         chassis.closeDevices(services);
@@ -213,7 +219,7 @@
         }
 
         // Create Chassis
-        Chassis chassis{1, std::move(devices)};
+        Chassis chassis{1, defaultInventoryPath, std::move(devices)};
 
         // Call closeDevices()
         chassis.closeDevices(services);
@@ -232,7 +238,8 @@
         EXPECT_CALL(journal, logError(A<const std::string&>())).Times(0);
 
         // Create Chassis
-        std::unique_ptr<Chassis> chassis = std::make_unique<Chassis>(1);
+        std::unique_ptr<Chassis> chassis =
+            std::make_unique<Chassis>(1, defaultInventoryPath);
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -300,8 +307,8 @@
         }
 
         // Create Chassis
-        std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(2, std::move(devices));
+        std::unique_ptr<Chassis> chassis = std::make_unique<Chassis>(
+            2, defaultInventoryPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -319,7 +326,7 @@
 {
     // Test where no devices were specified in constructor
     {
-        Chassis chassis{2};
+        Chassis chassis{2, defaultInventoryPath};
         EXPECT_EQ(chassis.getDevices().size(), 0);
     }
 
@@ -331,16 +338,22 @@
         devices.emplace_back(createDevice("vdd_reg2"));
 
         // Create Chassis
-        Chassis chassis{1, std::move(devices)};
+        Chassis chassis{1, defaultInventoryPath, std::move(devices)};
         EXPECT_EQ(chassis.getDevices().size(), 2);
         EXPECT_EQ(chassis.getDevices()[0]->getID(), "vdd_reg1");
         EXPECT_EQ(chassis.getDevices()[1]->getID(), "vdd_reg2");
     }
 }
 
+TEST(ChassisTests, GetInventoryPath)
+{
+    Chassis chassis{3, defaultInventoryPath};
+    EXPECT_EQ(chassis.getInventoryPath(), defaultInventoryPath);
+}
+
 TEST(ChassisTests, GetNumber)
 {
-    Chassis chassis{3};
+    Chassis chassis{3, defaultInventoryPath};
     EXPECT_EQ(chassis.getNumber(), 3);
 }
 
@@ -356,8 +369,8 @@
 
         // Create Chassis
         std::vector<std::unique_ptr<Device>> devices{};
-        std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+        std::unique_ptr<Chassis> chassis = std::make_unique<Chassis>(
+            1, defaultInventoryPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -421,8 +434,8 @@
 
         // Create Chassis
         devices.emplace_back(std::move(device));
-        std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+        std::unique_ptr<Chassis> chassis = std::make_unique<Chassis>(
+            1, defaultInventoryPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
diff --git a/phosphor-regulators/test/config_file_parser_tests.cpp b/phosphor-regulators/test/config_file_parser_tests.cpp
index 19bf73b..c2cf08e 100644
--- a/phosphor-regulators/test/config_file_parser_tests.cpp
+++ b/phosphor-regulators/test/config_file_parser_tests.cpp
@@ -760,6 +760,8 @@
         )"_json;
         std::unique_ptr<Chassis> chassis = parseChassis(element);
         EXPECT_EQ(chassis->getNumber(), 1);
+        EXPECT_EQ(chassis->getInventoryPath(),
+                  "/xyz/openbmc_project/inventory/system/chassis");
         EXPECT_EQ(chassis->getDevices().size(), 0);
     }
 
@@ -769,6 +771,7 @@
             {
               "comments": [ "comments property" ],
               "number": 2,
+              "inventory_path": "system/chassis2",
               "devices": [
                 {
                   "id": "vdd_regulator",
@@ -785,6 +788,8 @@
         )"_json;
         std::unique_ptr<Chassis> chassis = parseChassis(element);
         EXPECT_EQ(chassis->getNumber(), 2);
+        EXPECT_EQ(chassis->getInventoryPath(),
+                  "/xyz/openbmc_project/inventory/system/chassis2");
         EXPECT_EQ(chassis->getDevices().size(), 1);
         EXPECT_EQ(chassis->getDevices()[0]->getID(), "vdd_regulator");
     }
@@ -805,6 +810,40 @@
         EXPECT_STREQ(e.what(), "Element is not an unsigned integer");
     }
 
+    // Test where fails: inventory_path is invalid: Not a string
+    try
+    {
+        const json element = R"(
+            {
+              "number": 2,
+              "inventory_path": true
+            }
+        )"_json;
+        parseChassis(element);
+        ADD_FAILURE() << "Should not have reached this line.";
+    }
+    catch (const std::invalid_argument& e)
+    {
+        EXPECT_STREQ(e.what(), "Element is not a string");
+    }
+
+    // Test where fails: inventory_path is invalid: Empty string
+    try
+    {
+        const json element = R"(
+            {
+              "number": 2,
+              "inventory_path": ""
+            }
+        )"_json;
+        parseChassis(element);
+        ADD_FAILURE() << "Should not have reached this line.";
+    }
+    catch (const std::invalid_argument& e)
+    {
+        EXPECT_STREQ(e.what(), "Element contains an empty string");
+    }
+
     // Test where fails: Invalid property specified
     try
     {
diff --git a/phosphor-regulators/test/configuration_tests.cpp b/phosphor-regulators/test/configuration_tests.cpp
index 47279be..2f4ded6 100644
--- a/phosphor-regulators/test/configuration_tests.cpp
+++ b/phosphor-regulators/test/configuration_tests.cpp
@@ -49,6 +49,9 @@
 using ::testing::Throw;
 using ::testing::TypedEq;
 
+static const std::string chassisInvPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(ConfigurationTests, Constructor)
 {
     // Test where volts value specified
@@ -122,7 +125,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -182,7 +185,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -249,7 +252,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -315,7 +318,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -384,7 +387,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -460,7 +463,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
diff --git a/phosphor-regulators/test/device_tests.cpp b/phosphor-regulators/test/device_tests.cpp
index c3ed166..0c386fb 100644
--- a/phosphor-regulators/test/device_tests.cpp
+++ b/phosphor-regulators/test/device_tests.cpp
@@ -50,6 +50,9 @@
 using ::testing::Throw;
 using ::testing::TypedEq;
 
+static const std::string chassisInvPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(DeviceTests, Constructor)
 {
     // Test where only required parameters are specified
@@ -190,7 +193,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -342,7 +345,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -375,7 +378,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -461,7 +464,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -624,7 +627,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -662,7 +665,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -700,7 +703,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -755,7 +758,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -821,7 +824,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
diff --git a/phosphor-regulators/test/presence_detection_tests.cpp b/phosphor-regulators/test/presence_detection_tests.cpp
index e89af2c..c63f403 100644
--- a/phosphor-regulators/test/presence_detection_tests.cpp
+++ b/phosphor-regulators/test/presence_detection_tests.cpp
@@ -107,8 +107,8 @@
     // Create Chassis that contains Device
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
-    std::unique_ptr<Chassis> chassis =
-        std::make_unique<Chassis>(1, std::move(devices));
+    std::unique_ptr<Chassis> chassis = std::make_unique<Chassis>(
+        1, "/xyz/openbmc_project/inventory/system/chassis", std::move(devices));
     Chassis* chassisPtr = chassis.get();
 
     // Create System that contains Chassis
diff --git a/phosphor-regulators/test/rail_tests.cpp b/phosphor-regulators/test/rail_tests.cpp
index f0d9529..4f52701 100644
--- a/phosphor-regulators/test/rail_tests.cpp
+++ b/phosphor-regulators/test/rail_tests.cpp
@@ -44,6 +44,9 @@
 using ::testing::Return;
 using ::testing::TypedEq;
 
+static const std::string chassisInvPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(RailTests, Constructor)
 {
     // Test where only required parameters are specified
@@ -115,7 +118,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -169,7 +172,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -250,7 +253,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -316,7 +319,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
diff --git a/phosphor-regulators/test/sensor_monitoring_tests.cpp b/phosphor-regulators/test/sensor_monitoring_tests.cpp
index f2f4359..4dfd415 100644
--- a/phosphor-regulators/test/sensor_monitoring_tests.cpp
+++ b/phosphor-regulators/test/sensor_monitoring_tests.cpp
@@ -50,6 +50,9 @@
 using ::testing::Throw;
 using ::testing::TypedEq;
 
+static const std::string chassisInvPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(SensorMonitoringTests, Constructor)
 {
     std::vector<std::unique_ptr<Action>> actions{};
@@ -115,7 +118,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
@@ -198,7 +201,7 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(std::move(device));
         std::unique_ptr<Chassis> chassis =
-            std::make_unique<Chassis>(1, std::move(devices));
+            std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
         Chassis* chassisPtr = chassis.get();
 
         // Create System that contains Chassis
diff --git a/phosphor-regulators/test/system_tests.cpp b/phosphor-regulators/test/system_tests.cpp
index 5ce76ed..2bd94e0 100644
--- a/phosphor-regulators/test/system_tests.cpp
+++ b/phosphor-regulators/test/system_tests.cpp
@@ -43,6 +43,9 @@
 using ::testing::Return;
 using ::testing::TypedEq;
 
+static const std::string chassisInvPath{
+    "/xyz/openbmc_project/inventory/system/chassis"};
+
 TEST(SystemTests, Constructor)
 {
     // Create Rules
@@ -53,7 +56,8 @@
     std::vector<std::unique_ptr<Chassis>> chassis{};
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(createDevice("reg1", {"rail1"}));
-    chassis.emplace_back(std::make_unique<Chassis>(1, std::move(devices)));
+    chassis.emplace_back(
+        std::make_unique<Chassis>(1, chassisInvPath, std::move(devices)));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
@@ -87,7 +91,7 @@
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
     std::unique_ptr<Chassis> chassis =
-        std::make_unique<Chassis>(1, std::move(devices));
+        std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
     Chassis* chassisPtr = chassis.get();
 
     // Create System that contains Chassis
@@ -123,8 +127,8 @@
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
-    chassis.emplace_back(std::make_unique<Chassis>(1));
-    chassis.emplace_back(std::make_unique<Chassis>(3));
+    chassis.emplace_back(std::make_unique<Chassis>(1, chassisInvPath + '1'));
+    chassis.emplace_back(std::make_unique<Chassis>(3, chassisInvPath + '3'));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
@@ -148,8 +152,8 @@
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
-    chassis.emplace_back(std::make_unique<Chassis>(1));
-    chassis.emplace_back(std::make_unique<Chassis>(3));
+    chassis.emplace_back(std::make_unique<Chassis>(1, chassisInvPath + '1'));
+    chassis.emplace_back(std::make_unique<Chassis>(3, chassisInvPath + '3'));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
@@ -165,8 +169,8 @@
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
-    chassis.emplace_back(std::make_unique<Chassis>(1));
-    chassis.emplace_back(std::make_unique<Chassis>(3));
+    chassis.emplace_back(std::make_unique<Chassis>(1, chassisInvPath + '1'));
+    chassis.emplace_back(std::make_unique<Chassis>(3, chassisInvPath + '3'));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
@@ -189,14 +193,16 @@
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(createDevice("reg1", {"rail1"}));
         devices.emplace_back(createDevice("reg2", {"rail2a", "rail2b"}));
-        chassis.emplace_back(std::make_unique<Chassis>(1, std::move(devices)));
+        chassis.emplace_back(std::make_unique<Chassis>(1, chassisInvPath + '1',
+                                                       std::move(devices)));
     }
     {
         // Chassis 2
         std::vector<std::unique_ptr<Device>> devices{};
         devices.emplace_back(createDevice("reg3", {"rail3a", "rail3b"}));
         devices.emplace_back(createDevice("reg4"));
-        chassis.emplace_back(std::make_unique<Chassis>(2, std::move(devices)));
+        chassis.emplace_back(std::make_unique<Chassis>(2, chassisInvPath + '2',
+                                                       std::move(devices)));
     }
 
     // Create System
@@ -233,7 +239,7 @@
 
     // Create Chassis
     std::vector<std::unique_ptr<Chassis>> chassis{};
-    chassis.emplace_back(std::make_unique<Chassis>(1));
+    chassis.emplace_back(std::make_unique<Chassis>(1, chassisInvPath));
 
     // Create System
     System system{std::move(rules), std::move(chassis)};
@@ -293,7 +299,7 @@
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
     std::unique_ptr<Chassis> chassis =
-        std::make_unique<Chassis>(1, std::move(devices));
+        std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
 
     // Create System that contains Chassis
     std::vector<std::unique_ptr<Rule>> rules{};