From d2e38db76250f42e106c47a4ddbaca1d0e3a0ca4 Mon Sep 17 00:00:00 2001 From: Charlie Wheeler-Robinson Date: Thu, 7 Sep 2023 09:21:46 -0400 Subject: [PATCH] update environment verification URIs Signed-off-by: Charlie Wheeler-Robinson --- pkg/validations/cluster_version.go | 2 +- pkg/validations/common.go | 7 ++++++- pkg/validations/device.go | 2 +- pkg/validations/device_driver.go | 2 +- pkg/validations/device_firmware.go | 2 +- pkg/validations/gnss_ant_power_status.go | 2 +- pkg/validations/gnss_devices.go | 2 +- pkg/validations/gnss_firmware_version.go | 2 +- pkg/validations/gnss_module.go | 2 +- pkg/validations/gnss_protocol_version.go | 2 +- pkg/validations/gnss_receiving_data.go | 2 +- pkg/validations/gpsd_version.go | 2 +- pkg/validations/grand_master.go | 2 +- pkg/validations/operator_version.go | 4 ++-- 14 files changed, 20 insertions(+), 15 deletions(-) diff --git a/pkg/validations/cluster_version.go b/pkg/validations/cluster_version.go index 5fff6f93..d6bd4ee2 100644 --- a/pkg/validations/cluster_version.go +++ b/pkg/validations/cluster_version.go @@ -17,7 +17,7 @@ import ( ) const ( - clusterVersionID = TGMIdBaseURI + "/version/ocp/" + clusterVersionID = TGMEnvVerPath + "/RHOCP/" MinClusterVersion = "4.14.0-0" // trailing -0 is required to allow preGA version ) diff --git a/pkg/validations/common.go b/pkg/validations/common.go index 3112d991..04b6b6be 100644 --- a/pkg/validations/common.go +++ b/pkg/validations/common.go @@ -11,7 +11,12 @@ import ( "github.com/redhat-partner-solutions/vse-sync-collection-tools/pkg/utils" ) -const TGMIdBaseURI = "https://github.com/redhat-partner-solutions/vse-sync-test/tree/main/tests/sync/G.8272/environment" +const ( + TGMTestIDBase = "https://github.com/redhat-partner-solutions/vse-sync-test/tree/main/tests" + TGMEnvModelPath = TGMTestIDBase + "/environment/model" + TGMEnvVerPath = TGMTestIDBase + "/environment/version" + TGMSyncEnvPath = TGMTestIDBase + "/sync/G.8272/environment/status" +) type VersionCheck struct { id string `json:"-"` diff --git a/pkg/validations/device.go b/pkg/validations/device.go index 1895f1c2..faa5893d 100644 --- a/pkg/validations/device.go +++ b/pkg/validations/device.go @@ -10,7 +10,7 @@ import ( ) const ( - deviceDetailsID = TGMIdBaseURI + "/version/nic/model/wpc/" + deviceDetailsID = TGMEnvModelPath + "/nic/" deviceDetailsDescription = "Card is valid NIC" ) diff --git a/pkg/validations/device_driver.go b/pkg/validations/device_driver.go index 549d62ca..574c83fd 100644 --- a/pkg/validations/device_driver.go +++ b/pkg/validations/device_driver.go @@ -12,7 +12,7 @@ import ( ) const ( - deviceDriverVersionID = TGMIdBaseURI + "/version/nic/driver/wpc/" + deviceDriverVersionID = TGMEnvVerPath + "/ice-driver/" deviceDriverVersionDescription = "Card driver is valid" ) diff --git a/pkg/validations/device_firmware.go b/pkg/validations/device_firmware.go index 7f9b80e1..7720b7a7 100644 --- a/pkg/validations/device_firmware.go +++ b/pkg/validations/device_firmware.go @@ -9,7 +9,7 @@ import ( ) const ( - deviceFirmwareID = TGMIdBaseURI + "/version/nic/firmware/wpc/" + deviceFirmwareID = TGMEnvVerPath + "/nic-firmware/" deviceFirmwareDescription = "Card firmware is valid" ) diff --git a/pkg/validations/gnss_ant_power_status.go b/pkg/validations/gnss_ant_power_status.go index 4fac684c..dfb407df 100644 --- a/pkg/validations/gnss_ant_power_status.go +++ b/pkg/validations/gnss_ant_power_status.go @@ -11,7 +11,7 @@ import ( const ( expectedAntStatus = 2 - gnssAntStatusID = TGMIdBaseURI + "/status/gnss/antenna-connected/wpc/" + gnssAntStatusID = TGMSyncEnvPath + "/gnss/antenna-connected/wpc/" gnssAntStatusDescription = "GNSS Module is connected to an antenna" ) diff --git a/pkg/validations/gnss_devices.go b/pkg/validations/gnss_devices.go index 564d1ccd..dad61cb7 100644 --- a/pkg/validations/gnss_devices.go +++ b/pkg/validations/gnss_devices.go @@ -10,7 +10,7 @@ import ( ) const ( - hadGNSSDevices = TGMIdBaseURI + "/status/gnss/device-detected/wpc/" + hadGNSSDevices = TGMSyncEnvPath + "/gnss/device-detected/wpc/" hadGNSSDevicesDescription = "Has GNSS Devices" ) diff --git a/pkg/validations/gnss_firmware_version.go b/pkg/validations/gnss_firmware_version.go index 09528b9b..4e31e28c 100644 --- a/pkg/validations/gnss_firmware_version.go +++ b/pkg/validations/gnss_firmware_version.go @@ -9,7 +9,7 @@ import ( ) const ( - gnssID = TGMIdBaseURI + "/version/gnss/firmware/wpc/" + gnssID = TGMEnvVerPath + "/gnss-firmware/" gnssDescription = "GNSS Version is valid" ) diff --git a/pkg/validations/gnss_module.go b/pkg/validations/gnss_module.go index 3777d77e..fabbdcd9 100644 --- a/pkg/validations/gnss_module.go +++ b/pkg/validations/gnss_module.go @@ -11,7 +11,7 @@ import ( const ( expectedModuleName = "ZED-F9T" - gnssModuleIsCorrect = TGMIdBaseURI + "/version/gnss/model/wpc/" + gnssModuleIsCorrect = TGMEnvModelPath + "/gnss/" gnssModuleIsCorrectDescription = "GNSS module is valid" ) diff --git a/pkg/validations/gnss_protocol_version.go b/pkg/validations/gnss_protocol_version.go index 7ebbae86..8d9b2b86 100644 --- a/pkg/validations/gnss_protocol_version.go +++ b/pkg/validations/gnss_protocol_version.go @@ -7,7 +7,7 @@ import ( ) const ( - gnssProtID = TGMIdBaseURI + "/version/gnss/protocol/wpc/" + gnssProtID = TGMEnvVerPath + "/gnss-protocol/" gnssProtIDescription = "GNSS protocol version is valid" MinProtoVersion = "29.20" ) diff --git a/pkg/validations/gnss_receiving_data.go b/pkg/validations/gnss_receiving_data.go index 45f3b538..1bf7a0fe 100644 --- a/pkg/validations/gnss_receiving_data.go +++ b/pkg/validations/gnss_receiving_data.go @@ -10,7 +10,7 @@ import ( ) const ( - gnssStatusID = TGMIdBaseURI + "/status/gnss/gpsfix-valid/wpc/" + gnssStatusID = TGMSyncEnvPath + "/gnss/gpsfix-valid/wpc/" gnssStatusDescription = "GNSS Module receiving data" ) diff --git a/pkg/validations/gpsd_version.go b/pkg/validations/gpsd_version.go index 0c4dce46..3f0fb28b 100644 --- a/pkg/validations/gpsd_version.go +++ b/pkg/validations/gpsd_version.go @@ -9,7 +9,7 @@ import ( ) const ( - gpsdID = TGMIdBaseURI + "/version/gnss/gpsd/wpc/" + gpsdID = TGMEnvVerPath + "/gpsd/" gpsdDescription = "GPSD Version is valid" MinGSPDVersion = "3.25" ) diff --git a/pkg/validations/grand_master.go b/pkg/validations/grand_master.go index 4e70b037..c2546205 100644 --- a/pkg/validations/grand_master.go +++ b/pkg/validations/grand_master.go @@ -14,7 +14,7 @@ import ( ) const ( - configuredForGrandMaster = TGMIdBaseURI + "/status/ptp-operator/" + configuredForGrandMaster = TGMSyncEnvPath + "/ptp-operator/" configuredForGrandMasterDescription = "Configured for grand master" gmFlag = "ts2phc.master 1" ) diff --git a/pkg/validations/operator_version.go b/pkg/validations/operator_version.go index 84fcbb83..357feb25 100644 --- a/pkg/validations/operator_version.go +++ b/pkg/validations/operator_version.go @@ -17,8 +17,8 @@ import ( ) const ( - ptpOperatorVersionID = TGMIdBaseURI + "/version/ptp-operator/" - ptpOperatorVersionDescription = "PTP Operactor Version is valid" + ptpOperatorVersionID = TGMEnvVerPath + "/openshift/ptp-operator/" + ptpOperatorVersionDescription = "PTP Operator Version is valid" MinOperatorVersion = "4.14.0-0" // trailing -0 is required to allow preGA version ptpOperatorDiplayName = "PTP Operator" )