Add tests for the JSON decoder.
These tests will test the bej_decoder_core.c as well.
Signed-off-by: Kasun Athukorala <kasunath@google.com>
Change-Id: Ibf1c9a381a630beac09ed504dd57563160579fb0
diff --git a/test/json/storage.json b/test/json/storage.json
new file mode 100644
index 0000000..007c4ff
--- /dev/null
+++ b/test/json/storage.json
@@ -0,0 +1,79 @@
+{
+ "@odata.type": "#Storage.v1_3_0.Storage",
+ "@odata.context": "/redfish/v1/$metadata#Storage.Storage",
+ "@odata.id": "/redfish/v1/Systems/1/Storage/1",
+ "Id": "RAID Controller 1",
+ "Name": "RAID Controller",
+ "Description": "RAID Controller",
+ "Status": {
+ "State": "Enabled",
+ "Health": "OK",
+ "HealthRollup": "OK"
+ },
+ "StorageControllers": [
+ {
+ "@odata.id": "/redfish/v1/Systems/1/Storage/1#/StorageControllers/0",
+ "@odata.type": "#Storage.v1_3_0.StorageController",
+ "MemberId": "0",
+ "Name": "SAS RAID Controller",
+ "Status": {
+ "State": "Enabled",
+ "Health": "OK"
+ },
+ "Identifiers": [
+ {
+ "DurableNameFormat": "NAA",
+ "DurableName": "5045594843305852483430304E452000"
+ }
+ ],
+ "Manufacturer": "Consorto",
+ "Model": "Consorty RAID Controller XYZ",
+ "SerialNumber": "PEYHC0XRH400NE",
+ "PartNumber": "7334534",
+ "SpeedGbps": 12.0,
+ "FirmwareVersion": "1.00",
+ "SupportedControllerProtocols": [
+ "PCIe"
+ ],
+ "SupportedDeviceProtocols": [
+ "SAS",
+ "SATA"
+ ]
+ }
+ ],
+ "Drives": [
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.1"
+ },
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.2"
+ },
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.3"
+ },
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.4"
+ },
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.5"
+ },
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1/Drives/Disk.Bay.6"
+ }
+ ],
+ "Volumes": {
+ "@odata.id": "/redfish/v1/volcollection"
+ },
+ "Links": {
+ "Enclosures": [
+ {
+ "@odata.id": "/redfish/v1/Chassis/StorageEnclosure1"
+ }
+ ]
+ },
+ "@Redfish.OperationApplyTime": "Immediate",
+ "@Redfish.CollectionCapabilities": {
+ "MaxMembers": 0
+ },
+ "@Message.ExtendedInfo": []
+}