regulators: Update test cases for new jsonschema

The validate-regulators-config.py tool validates regulator configuration
files.  It uses the jsonschema Python package to perform much of the
validation.

The automated test cases for this tool run the tool against various
invalid configuration files and verify the resulting error messages.

The latest version of jsonschema changed the error messages that are
emitted in some error cases.  Update the test cases to expect the new
error messages.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I369f32705c64c19d521c4624188ebbc98522cff2
diff --git a/phosphor-regulators/test/validate-regulators-config_tests.cpp b/phosphor-regulators/test/validate-regulators-config_tests.cpp
index 2763cc9..16b2fec 100644
--- a/phosphor-regulators/test/validate-regulators-config_tests.cpp
+++ b/phosphor-regulators/test/validate-regulators-config_tests.cpp
@@ -467,8 +467,9 @@
         json configFile = validConfigFile;
         configFile["rules"][0]["actions"][1]["comments"][0] =
             "Check if bit 3 is on";
-        EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'and' is a required property");
+        EXPECT_JSON_INVALID(
+            configFile, "Validation failed.",
+            "{'comments': ['Check if bit 3 is on']} is not valid under any of the given schemas");
     }
     // Invalid: Multiple action types specified (such as both 'compare_presence'
     // and 'pmbus_write_vout_command')
@@ -753,8 +754,9 @@
     {
         json configFile = compareVpdFile;
         configFile["rules"][0]["actions"][1]["compare_vpd"].erase("value");
-        EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'value' is a required property");
+        EXPECT_JSON_INVALID(
+            configFile, "Validation failed.",
+            "{'fru': 'system/chassis/motherboard/regulator2', 'keyword': 'CCIN'} is not valid under any of the given schemas");
     }
 
     // Invalid: property FRU wrong type.
@@ -984,8 +986,9 @@
         json configFile = configurationFile;
         configFile["chassis"][0]["devices"][0]["configuration"].erase(
             "rule_id");
-        EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'rule_id' is a required property");
+        EXPECT_JSON_INVALID(
+            configFile, "Validation failed.",
+            "{'comments': ['Set rail to 1.25V using standard rule'], 'volts': 1.25} is not valid under any of the given schemas");
     }
     // Invalid: test configuration with property volts wrong type.
     {
@@ -1068,8 +1071,9 @@
     {
         json configFile = validConfigFile;
         configFile["chassis"][0]["devices"][0].erase("is_regulator");
-        EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'is_regulator' is a required property");
+        EXPECT_JSON_INVALID(
+            configFile, "Validation failed.",
+            "{'comments': ['IR35221 regulator producing the Vdd rail'], 'fru': 'system/chassis/motherboard/regulator1', 'i2c_interface': {'address': '0x70', 'bus': 1}, 'id': 'vdd_regulator', 'rails': [{'comments': ['Vdd rail'], 'configuration': {'rule_id': 'set_voltage_rule', 'volts': 1.03}, 'id': 'vdd', 'sensor_monitoring': {'rule_id': 'read_sensors_rule'}}]} should not be valid under {'anyOf': [{'required': ['phase_fault_detection']}, {'required': ['rails']}]}");
     }
     // Invalid: test devices with no fru.
     {
@@ -2412,7 +2416,7 @@
         configFile["chassis"][0]["devices"][0]["phase_fault_detection"].erase(
             "rule_id");
         EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'rule_id' is a required property");
+                            "{} is not valid under any of the given schemas");
     }
 
     // Invalid: comments has wrong data type
@@ -2719,8 +2723,9 @@
         json configFile = presenceDetectionFile;
         configFile["chassis"][0]["devices"][0]["presence_detection"].erase(
             "rule_id");
-        EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'rule_id' is a required property");
+        EXPECT_JSON_INVALID(
+            configFile, "Validation failed.",
+            "{'comments': ['Regulator is only present if CPU3 is present']} is not valid under any of the given schemas");
     }
     // Invalid: test presence_detection with property comments wrong type.
     {
@@ -2999,7 +3004,7 @@
         configFile["chassis"][0]["devices"][0]["rails"][0]["sensor_monitoring"]
             .erase("rule_id");
         EXPECT_JSON_INVALID(configFile, "Validation failed.",
-                            "'rule_id' is a required property");
+                            "{} is not valid under any of the given schemas");
     }
     // Invalid: test rails sensor_monitoring with property comments wrong type.
     {