diff --git a/test/e2e/cypress/fixtures/.photofinish.toml b/test/e2e/cypress/fixtures/.photofinish.toml index f55ada271..c7d9f298b 100644 --- a/test/e2e/cypress/fixtures/.photofinish.toml +++ b/test/e2e/cypress/fixtures/.photofinish.toml @@ -6,17 +6,14 @@ directories = ["./healthy-27-node-SAP-cluster"] files = ["./sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GRAY.json"] - [sap-system-detail-GREEN] files = ["./sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GREEN.json"] - [sap-system-detail-YELLOW] files = ["./sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_YELLOW.json"] - [sap-system-detail-RED] files = ["./sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_RED.json"] @@ -24,3 +21,23 @@ files = ["./sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_d [sap-system-detail-NEW] files = ["./sap-system-details/newagent_sap_system_discovery_new.json"] + +[hana-database-detail-GRAY] + +files = ["./hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json"] + +[hana-database-detail-GREEN] + +files = ["./hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json"] + +[hana-database-detail-YELLOW] + +files = ["./hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json"] + +[hana-database-detail-RED] + +files = ["./hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json"] + +[hana-database-detail-NEW] + +files = ["./hana-database-details/newagent_sap_system_discovery_new.json"] diff --git a/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json new file mode 100644 index 000000000..937268762 --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json @@ -0,0 +1,230 @@ +{ + "agent_id": "0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4", + "discovery_type": "sap_system_discovery", + "payload": [ + { + "Id": "fd44c254ccb14331e54015c720c7a1f2", + "SID": "HDD", + "Type": 1, + "Profile": { + "SAPGLOBALHOST": "vmhdbdev02", + "SAPSYSTEMNAME": "HDD", + "hdbConfigType": "DEFAULT", + "ssl/ciphersuites": "135:PFS:HIGH::EC_P256:EC_HIGH", + "HDB_LINKED_BINARIES": "yes", + "HDB_SHARED_BINARIES": "yes" + }, + "Databases": [ + { + "Host": "vmhdbdev02", + "User": "", + "Group": "", + "Active": "yes", + "UserId": "", + "GroupId": "", + "SqlPort": "31015", + "Database": "HDD", + "Container": "" + } + ], + "Instances": { + "HDB10": { + "Host": "vmhdbdev02", + "Name": "HDB10", + "Type": 1, + "SAPControl": { + "Instances": { + "vmhdbdev02": { + "features": "HDB|HDB_WORKER", + "hostname": "vmhdbdev02", + "httpPort": 51013, + "httpsPort": 51014, + "dispstatus": "SAPControl-GRAY", + "instanceNr": 10, + "startPriority": "0.3" + } + }, + "Processes": { + "hdbdaemon": { + "pid": 24133, + "name": "hdbdaemon", + "starttime": "2022 01 11 12:57:31", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Daemon", + "elapsedtime": "151:54:31" + }, + "hdbxsengine": { + "pid": 24925, + "name": "hdbxsengine", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB XSEngine-HDD", + "elapsedtime": "151:54:17" + }, + "hdbnameserver": { + "pid": 24153, + "name": "hdbnameserver", + "starttime": "2022 01 11 12:57:32", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Nameserver", + "elapsedtime": "151:54:30" + }, + "hdbindexserver": { + "pid": 24916, + "name": "hdbindexserver", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Indexserver-HDD", + "elapsedtime": "151:54:17" + }, + "hdbpreprocessor": { + "pid": 24822, + "name": "hdbpreprocessor", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Preprocessor", + "elapsedtime": "151:54:18" + }, + "hdbcompileserver": { + "pid": 24819, + "name": "hdbcompileserver", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Compileserver", + "elapsedtime": "151:54:18" + }, + "hdbwebdispatcher": { + "pid": 25653, + "name": "hdbwebdispatcher", + "starttime": "2022 01 11 12:57:53", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Web Dispatcher", + "elapsedtime": "151:54:09" + } + }, + "Properties": { + "SAPSYSTEM": { + "value": "10", + "property": "SAPSYSTEM", + "propertytype": "Attribute" + }, + "DBServices": { + "value": "YES", + "property": "DBServices", + "propertytype": "Attribute" + }, + "HANA Roles": { + "value": "worker", + "property": "HANA Roles", + "propertytype": "Attribute" + }, + "Webmethods": { + "value": "Start,InstanceStart,StartBypassHA,Bootstrap,Stop,InstanceStop,StopBypassHA,Shutdown,ParameterValue,GetProcessList,GetStartProfile,GetTraceFile,GetAlertTree,GetAlerts,RestartService,StopService,GetEnvironment,ListDeveloperTraces,ReadDeveloperTrace,RestartInstance,SendSignal,GetVersionInfo,GetQueueStatistic,GetInstanceProperties,OSExecute,ReadLogFile,AnalyseLogFiles,ListLogFiles,GetAccessPointList,GetSystemInstanceList,GetSystemUpdateList,StartSystem,StopSystem,RestartSystem,UpdateSystem,UpdateSCSInstance,CheckUpdateSystem,AccessCheck,GetProcessParameter,SetProcessParameter,SetProcessParameter2,CheckParameter,ShmDetach,GetNetworkId,GetSecNetworkId,RequestLogonFile,CreateSnapshot,ReadSnapshot,ListSnapshots,DeleteSnapshots,GetCallstack,ABAPReadSyslog,ABAPReadRawSyslog,ABAPGetWPTable,ABAPAcknowledgeAlerts,ABAPGetComponentList,ABAPCheckRFCDestinations,ABAPGetSystemWPTable,J2EEGetProcessList,J2EEGetProcessList2,J2EEControlProcess,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadCallStack,J2EEGetThreadTaskStack,J2EEGetSessionList,J2EEGetWebSessionList,J2EEGetWebSessionList2,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetApplicationAliasList,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetEJBSessionList,J2EEGetRemoteObjectList,J2EEGetClusterMsgList,J2EEGetSharedTableInfo,J2EEGetComponentList,J2EEControlComponents,ICMGetThreadList,ICMGetConnectionList,ICMGetCacheEntries,ICMGetProxyConnectionList,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,EnqGetLockTable,EnqRemoveLocks,EnqRemoveUserLocks,EnqGetStatistic,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,UpdateSystemPKI,UpdateInstancePSE,StorePSE,DeletePSE,CheckPSE,HACheckConfig,HACheckFailoverConfig,HAGetFailoverConfig,HAFailoverToNode,HASetMaintenanceMode,HACheckMaintenanceMode,ListConfigFiles,ReadConfigFile", + "property": "Webmethods", + "propertytype": "Attribute" + }, + "Process List": { + "value": "GetProcessList", + "property": "Process List", + "propertytype": "NodeWebmethod" + }, + "SAPLOCALHOST": { + "value": "vmhdbdev02", + "property": "SAPLOCALHOST", + "propertytype": "Attribute" + }, + "Access Points": { + "value": "GetAccessPointList", + "property": "Access Points", + "propertytype": "NodeWebmethod" + }, + "INSTANCE_NAME": { + "value": "HDB10", + "property": "INSTANCE_NAME", + "propertytype": "Attribute" + }, + "SAPSYSTEMNAME": { + "value": "HDD", + "property": "SAPSYSTEMNAME", + "propertytype": "Attribute" + }, + "StartPriority": { + "value": "0.3", + "property": "StartPriority", + "propertytype": "Attribute" + }, + "Protected Webmethods": { + "value": "ABAPAcknowledgeAlerts,ABAPCheckRFCDestinations,ABAPGetComponentList,ABAPGetSystemWPTable,ABAPGetWPTable,ABAPReadRawSyslog,ABAPReadSyslog,AnalyseLogFiles,Bootstrap,CheckParameter,CheckPSE,CheckUpdateSystem,ConfigureLogFileList,CreatePSECredential,CreateSnapshot,DeletePSE,DeleteSnapshots,EnqGetLockTable,EnqGetStatistic,EnqRemoveLocks,EnqRemoveUserLocks,GetAccessPointList,GetAlerts,GetAlertTree,GetCallstack,GetEnvironment,GetLogFileList,GetProcessParameter,GetQueueStatistic,GetStartProfile,GetSystemUpdateList,GetTraceFile,GetVersionInfo,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,HACheckConfig,HACheckFailoverConfig,HACheckMaintenanceMode,HAFailoverToNode,HAGetFailoverConfig,HASetMaintenanceMode,ICMGetCacheEntries,ICMGetConnectionList,ICMGetProxyConnectionList,ICMGetThreadList,InstanceStart,InstanceStop,J2EEControlCluster,J2EEControlComponents,J2EEControlProcess,J2EEDisableDbgSession,J2EEEnableDbgSession,J2EEGetApplicationAliasList,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetClusterMsgList,J2EEGetComponentList,J2EEGetEJBSessionList,J2EEGetProcessList,J2EEGetProcessList2,J2EEGetRemoteObjectList,J2EEGetSessionList,J2EEGetSharedTableInfo,J2EEGetThreadCallStack,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadTaskStack,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetWebSessionList,J2EEGetWebSessionList2,ListConfigFiles,ListDeveloperTraces,ListLogFiles,ListSnapshots,OSExecute,ParameterValue,ReadConfigFile,ReadDeveloperTrace,ReadLogFile,ReadSnapshot,RestartInstance,RestartService,RestartSystem,SendSignal,SetProcessParameter,SetProcessParameter2,ShmDetach,Shutdown,Start,StartBypassHA,StartSystem,Stop,StopBypassHA,StopService,StopSystem,StorePSE,UpdateInstancePSE,UpdateSCSInstance,UpdateSystem,UpdateSystemPKI,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,GetAgentConfig,GetListOfMaByCusGrp,GetMcInLocalMs,GetMtesByRequestTable,GetMtListByMtclass,InfoGetTree,MscCustomizeWrite,MscDeleteLines,MscReadCache,MsGetLocalMsInfo,MsGetMteclsInLocalMs,MtChangeStatus,MtCustomizeWrite,MtDbsetToWpsetByTid,MtDestroyMarkNTry,MteGetByToolRunstatus,MtGetAllToCust,MtGetAllToolsToSet,MtGetMteinfo,MtGetTidByName,MtRead,MtReset,PerfCustomizeWrite,PerfRead,PerfReadSmoothData,ReadDirectory,ReadFile,ReadProfileParameters,ReferenceRead,Register,RequestLogonFile,SnglmgsCustomizeWrite,SystemObjectSetValue,TextAttrRead,ToolGetEffective,ToolSet,ToolSetRuntimeStatus,TriggerDataCollection,Unregister,UtilAlChangeStatus,UtilMtGetAidByTid,UtilMtGetTreeLocal,UtilMtReadAll,UtilReadRawalertByAid,UtilSnglmsgReadRawdata", + "property": "Protected Webmethods", + "propertytype": "Attribute" + }, + "Parameter Documentation": { + "value": "http://vmhdbdev02:51013/sapparamEN.html", + "property": "Parameter Documentation", + "propertytype": "NodeURL" + } + } + }, + "HdbnsutilSRstate": { + "mode": "sync", + "online": "true", + "site_id": "2", + "isSource": "false", + "site_name": "WDF", + "isConsumer": "true", + "replayMode": "auto", + "hasConsumers": "false", + "siteTier/NBG": "1", + "siteTier/WDF": "2", + "operation_mode": "logreplay", + "primary_masters": "vmhdbdev01", + "siteMapping/NBG": "WDF", + "isTakeoverActive": "false", + "isPrimarySuspended": "false", + "mapping/vmhdbdev02": ["WDF/vmhdbdev02", "NBG/vmhdbdev01"], + "active_primary_site": "1", + "isTimetravelEnabled": "false", + "siteOperationMode/NBG": "primary", + "siteOperationMode/WDF": "logreplay", + "siteReplicationMode/NBG": "primary", + "siteReplicationMode/WDF": "sync" + }, + "HostConfiguration": { + "host": "vmhdbdev02", + "hostActive": "yes", + "hostStatus": "ok", + "removeStatus": "", + "failoverStatus": "", + "hostActualRoles": "worker", + "hostConfigRoles": "worker", + "storagePartition": "1", + "workerActualGroups": "default", + "workerConfigGroups": "default", + "failoverActualGroup": "default", + "failoverConfigGroup": "default", + "nameServerActualRole": "master", + "nameServerConfigRole": "master 1", + "indexServerActualRole": "master", + "indexServerConfigRole": "worker", + "storageActualPartition": "1", + "storageConfigPartition": "1" + }, + "SystemReplication": { + "local_site_id": "2", + "site/2/SITE_NAME": "WDF", + "site/2/SOURCE_SITE_ID": "1", + "site/2/PRIMARY_MASTERS": "vmhdbdev01", + "site/2/REPLICATION_MODE": "SYNC" + } + } + } + } + ] +} diff --git a/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json new file mode 100644 index 000000000..eaa0bc40c --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json @@ -0,0 +1,230 @@ +{ + "agent_id": "0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4", + "discovery_type": "sap_system_discovery", + "payload": [ + { + "Id": "fd44c254ccb14331e54015c720c7a1f2", + "SID": "HDD", + "Type": 1, + "Profile": { + "SAPGLOBALHOST": "vmhdbdev02", + "SAPSYSTEMNAME": "HDD", + "hdbConfigType": "DEFAULT", + "ssl/ciphersuites": "135:PFS:HIGH::EC_P256:EC_HIGH", + "HDB_LINKED_BINARIES": "yes", + "HDB_SHARED_BINARIES": "yes" + }, + "Databases": [ + { + "Host": "vmhdbdev02", + "User": "", + "Group": "", + "Active": "yes", + "UserId": "", + "GroupId": "", + "SqlPort": "31015", + "Database": "HDD", + "Container": "" + } + ], + "Instances": { + "HDB10": { + "Host": "vmhdbdev02", + "Name": "HDB10", + "Type": 1, + "SAPControl": { + "Instances": { + "vmhdbdev02": { + "features": "HDB|HDB_WORKER", + "hostname": "vmhdbdev02", + "httpPort": 51013, + "httpsPort": 51014, + "dispstatus": "SAPControl-GREEN", + "instanceNr": 10, + "startPriority": "0.3" + } + }, + "Processes": { + "hdbdaemon": { + "pid": 24133, + "name": "hdbdaemon", + "starttime": "2022 01 11 12:57:31", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Daemon", + "elapsedtime": "151:54:31" + }, + "hdbxsengine": { + "pid": 24925, + "name": "hdbxsengine", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB XSEngine-HDD", + "elapsedtime": "151:54:17" + }, + "hdbnameserver": { + "pid": 24153, + "name": "hdbnameserver", + "starttime": "2022 01 11 12:57:32", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Nameserver", + "elapsedtime": "151:54:30" + }, + "hdbindexserver": { + "pid": 24916, + "name": "hdbindexserver", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Indexserver-HDD", + "elapsedtime": "151:54:17" + }, + "hdbpreprocessor": { + "pid": 24822, + "name": "hdbpreprocessor", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Preprocessor", + "elapsedtime": "151:54:18" + }, + "hdbcompileserver": { + "pid": 24819, + "name": "hdbcompileserver", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Compileserver", + "elapsedtime": "151:54:18" + }, + "hdbwebdispatcher": { + "pid": 25653, + "name": "hdbwebdispatcher", + "starttime": "2022 01 11 12:57:53", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Web Dispatcher", + "elapsedtime": "151:54:09" + } + }, + "Properties": { + "SAPSYSTEM": { + "value": "10", + "property": "SAPSYSTEM", + "propertytype": "Attribute" + }, + "DBServices": { + "value": "YES", + "property": "DBServices", + "propertytype": "Attribute" + }, + "HANA Roles": { + "value": "worker", + "property": "HANA Roles", + "propertytype": "Attribute" + }, + "Webmethods": { + "value": "Start,InstanceStart,StartBypassHA,Bootstrap,Stop,InstanceStop,StopBypassHA,Shutdown,ParameterValue,GetProcessList,GetStartProfile,GetTraceFile,GetAlertTree,GetAlerts,RestartService,StopService,GetEnvironment,ListDeveloperTraces,ReadDeveloperTrace,RestartInstance,SendSignal,GetVersionInfo,GetQueueStatistic,GetInstanceProperties,OSExecute,ReadLogFile,AnalyseLogFiles,ListLogFiles,GetAccessPointList,GetSystemInstanceList,GetSystemUpdateList,StartSystem,StopSystem,RestartSystem,UpdateSystem,UpdateSCSInstance,CheckUpdateSystem,AccessCheck,GetProcessParameter,SetProcessParameter,SetProcessParameter2,CheckParameter,ShmDetach,GetNetworkId,GetSecNetworkId,RequestLogonFile,CreateSnapshot,ReadSnapshot,ListSnapshots,DeleteSnapshots,GetCallstack,ABAPReadSyslog,ABAPReadRawSyslog,ABAPGetWPTable,ABAPAcknowledgeAlerts,ABAPGetComponentList,ABAPCheckRFCDestinations,ABAPGetSystemWPTable,J2EEGetProcessList,J2EEGetProcessList2,J2EEControlProcess,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadCallStack,J2EEGetThreadTaskStack,J2EEGetSessionList,J2EEGetWebSessionList,J2EEGetWebSessionList2,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetApplicationAliasList,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetEJBSessionList,J2EEGetRemoteObjectList,J2EEGetClusterMsgList,J2EEGetSharedTableInfo,J2EEGetComponentList,J2EEControlComponents,ICMGetThreadList,ICMGetConnectionList,ICMGetCacheEntries,ICMGetProxyConnectionList,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,EnqGetLockTable,EnqRemoveLocks,EnqRemoveUserLocks,EnqGetStatistic,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,UpdateSystemPKI,UpdateInstancePSE,StorePSE,DeletePSE,CheckPSE,HACheckConfig,HACheckFailoverConfig,HAGetFailoverConfig,HAFailoverToNode,HASetMaintenanceMode,HACheckMaintenanceMode,ListConfigFiles,ReadConfigFile", + "property": "Webmethods", + "propertytype": "Attribute" + }, + "Process List": { + "value": "GetProcessList", + "property": "Process List", + "propertytype": "NodeWebmethod" + }, + "SAPLOCALHOST": { + "value": "vmhdbdev02", + "property": "SAPLOCALHOST", + "propertytype": "Attribute" + }, + "Access Points": { + "value": "GetAccessPointList", + "property": "Access Points", + "propertytype": "NodeWebmethod" + }, + "INSTANCE_NAME": { + "value": "HDB10", + "property": "INSTANCE_NAME", + "propertytype": "Attribute" + }, + "SAPSYSTEMNAME": { + "value": "HDD", + "property": "SAPSYSTEMNAME", + "propertytype": "Attribute" + }, + "StartPriority": { + "value": "0.3", + "property": "StartPriority", + "propertytype": "Attribute" + }, + "Protected Webmethods": { + "value": "ABAPAcknowledgeAlerts,ABAPCheckRFCDestinations,ABAPGetComponentList,ABAPGetSystemWPTable,ABAPGetWPTable,ABAPReadRawSyslog,ABAPReadSyslog,AnalyseLogFiles,Bootstrap,CheckParameter,CheckPSE,CheckUpdateSystem,ConfigureLogFileList,CreatePSECredential,CreateSnapshot,DeletePSE,DeleteSnapshots,EnqGetLockTable,EnqGetStatistic,EnqRemoveLocks,EnqRemoveUserLocks,GetAccessPointList,GetAlerts,GetAlertTree,GetCallstack,GetEnvironment,GetLogFileList,GetProcessParameter,GetQueueStatistic,GetStartProfile,GetSystemUpdateList,GetTraceFile,GetVersionInfo,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,HACheckConfig,HACheckFailoverConfig,HACheckMaintenanceMode,HAFailoverToNode,HAGetFailoverConfig,HASetMaintenanceMode,ICMGetCacheEntries,ICMGetConnectionList,ICMGetProxyConnectionList,ICMGetThreadList,InstanceStart,InstanceStop,J2EEControlCluster,J2EEControlComponents,J2EEControlProcess,J2EEDisableDbgSession,J2EEEnableDbgSession,J2EEGetApplicationAliasList,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetClusterMsgList,J2EEGetComponentList,J2EEGetEJBSessionList,J2EEGetProcessList,J2EEGetProcessList2,J2EEGetRemoteObjectList,J2EEGetSessionList,J2EEGetSharedTableInfo,J2EEGetThreadCallStack,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadTaskStack,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetWebSessionList,J2EEGetWebSessionList2,ListConfigFiles,ListDeveloperTraces,ListLogFiles,ListSnapshots,OSExecute,ParameterValue,ReadConfigFile,ReadDeveloperTrace,ReadLogFile,ReadSnapshot,RestartInstance,RestartService,RestartSystem,SendSignal,SetProcessParameter,SetProcessParameter2,ShmDetach,Shutdown,Start,StartBypassHA,StartSystem,Stop,StopBypassHA,StopService,StopSystem,StorePSE,UpdateInstancePSE,UpdateSCSInstance,UpdateSystem,UpdateSystemPKI,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,GetAgentConfig,GetListOfMaByCusGrp,GetMcInLocalMs,GetMtesByRequestTable,GetMtListByMtclass,InfoGetTree,MscCustomizeWrite,MscDeleteLines,MscReadCache,MsGetLocalMsInfo,MsGetMteclsInLocalMs,MtChangeStatus,MtCustomizeWrite,MtDbsetToWpsetByTid,MtDestroyMarkNTry,MteGetByToolRunstatus,MtGetAllToCust,MtGetAllToolsToSet,MtGetMteinfo,MtGetTidByName,MtRead,MtReset,PerfCustomizeWrite,PerfRead,PerfReadSmoothData,ReadDirectory,ReadFile,ReadProfileParameters,ReferenceRead,Register,RequestLogonFile,SnglmgsCustomizeWrite,SystemObjectSetValue,TextAttrRead,ToolGetEffective,ToolSet,ToolSetRuntimeStatus,TriggerDataCollection,Unregister,UtilAlChangeStatus,UtilMtGetAidByTid,UtilMtGetTreeLocal,UtilMtReadAll,UtilReadRawalertByAid,UtilSnglmsgReadRawdata", + "property": "Protected Webmethods", + "propertytype": "Attribute" + }, + "Parameter Documentation": { + "value": "http://vmhdbdev02:51013/sapparamEN.html", + "property": "Parameter Documentation", + "propertytype": "NodeURL" + } + } + }, + "HdbnsutilSRstate": { + "mode": "sync", + "online": "true", + "site_id": "2", + "isSource": "false", + "site_name": "WDF", + "isConsumer": "true", + "replayMode": "auto", + "hasConsumers": "false", + "siteTier/NBG": "1", + "siteTier/WDF": "2", + "operation_mode": "logreplay", + "primary_masters": "vmhdbdev01", + "siteMapping/NBG": "WDF", + "isTakeoverActive": "false", + "isPrimarySuspended": "false", + "mapping/vmhdbdev02": ["WDF/vmhdbdev02", "NBG/vmhdbdev01"], + "active_primary_site": "1", + "isTimetravelEnabled": "false", + "siteOperationMode/NBG": "primary", + "siteOperationMode/WDF": "logreplay", + "siteReplicationMode/NBG": "primary", + "siteReplicationMode/WDF": "sync" + }, + "HostConfiguration": { + "host": "vmhdbdev02", + "hostActive": "yes", + "hostStatus": "ok", + "removeStatus": "", + "failoverStatus": "", + "hostActualRoles": "worker", + "hostConfigRoles": "worker", + "storagePartition": "1", + "workerActualGroups": "default", + "workerConfigGroups": "default", + "failoverActualGroup": "default", + "failoverConfigGroup": "default", + "nameServerActualRole": "master", + "nameServerConfigRole": "master 1", + "indexServerActualRole": "master", + "indexServerConfigRole": "worker", + "storageActualPartition": "1", + "storageConfigPartition": "1" + }, + "SystemReplication": { + "local_site_id": "2", + "site/2/SITE_NAME": "WDF", + "site/2/SOURCE_SITE_ID": "1", + "site/2/PRIMARY_MASTERS": "vmhdbdev01", + "site/2/REPLICATION_MODE": "SYNC" + } + } + } + } + ] +} diff --git a/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json new file mode 100644 index 000000000..54f18bbfe --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json @@ -0,0 +1,230 @@ +{ + "agent_id": "0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4", + "discovery_type": "sap_system_discovery", + "payload": [ + { + "Id": "fd44c254ccb14331e54015c720c7a1f2", + "SID": "HDD", + "Type": 1, + "Profile": { + "SAPGLOBALHOST": "vmhdbdev02", + "SAPSYSTEMNAME": "HDD", + "hdbConfigType": "DEFAULT", + "ssl/ciphersuites": "135:PFS:HIGH::EC_P256:EC_HIGH", + "HDB_LINKED_BINARIES": "yes", + "HDB_SHARED_BINARIES": "yes" + }, + "Databases": [ + { + "Host": "vmhdbdev02", + "User": "", + "Group": "", + "Active": "yes", + "UserId": "", + "GroupId": "", + "SqlPort": "31015", + "Database": "HDD", + "Container": "" + } + ], + "Instances": { + "HDB10": { + "Host": "vmhdbdev02", + "Name": "HDB10", + "Type": 1, + "SAPControl": { + "Instances": { + "vmhdbdev02": { + "features": "HDB|HDB_WORKER", + "hostname": "vmhdbdev02", + "httpPort": 51013, + "httpsPort": 51014, + "dispstatus": "SAPControl-RED", + "instanceNr": 10, + "startPriority": "0.3" + } + }, + "Processes": { + "hdbdaemon": { + "pid": 24133, + "name": "hdbdaemon", + "starttime": "2022 01 11 12:57:31", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Daemon", + "elapsedtime": "151:54:31" + }, + "hdbxsengine": { + "pid": 24925, + "name": "hdbxsengine", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB XSEngine-HDD", + "elapsedtime": "151:54:17" + }, + "hdbnameserver": { + "pid": 24153, + "name": "hdbnameserver", + "starttime": "2022 01 11 12:57:32", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Nameserver", + "elapsedtime": "151:54:30" + }, + "hdbindexserver": { + "pid": 24916, + "name": "hdbindexserver", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Indexserver-HDD", + "elapsedtime": "151:54:17" + }, + "hdbpreprocessor": { + "pid": 24822, + "name": "hdbpreprocessor", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Preprocessor", + "elapsedtime": "151:54:18" + }, + "hdbcompileserver": { + "pid": 24819, + "name": "hdbcompileserver", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Compileserver", + "elapsedtime": "151:54:18" + }, + "hdbwebdispatcher": { + "pid": 25653, + "name": "hdbwebdispatcher", + "starttime": "2022 01 11 12:57:53", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Web Dispatcher", + "elapsedtime": "151:54:09" + } + }, + "Properties": { + "SAPSYSTEM": { + "value": "10", + "property": "SAPSYSTEM", + "propertytype": "Attribute" + }, + "DBServices": { + "value": "YES", + "property": "DBServices", + "propertytype": "Attribute" + }, + "HANA Roles": { + "value": "worker", + "property": "HANA Roles", + "propertytype": "Attribute" + }, + "Webmethods": { + "value": "Start,InstanceStart,StartBypassHA,Bootstrap,Stop,InstanceStop,StopBypassHA,Shutdown,ParameterValue,GetProcessList,GetStartProfile,GetTraceFile,GetAlertTree,GetAlerts,RestartService,StopService,GetEnvironment,ListDeveloperTraces,ReadDeveloperTrace,RestartInstance,SendSignal,GetVersionInfo,GetQueueStatistic,GetInstanceProperties,OSExecute,ReadLogFile,AnalyseLogFiles,ListLogFiles,GetAccessPointList,GetSystemInstanceList,GetSystemUpdateList,StartSystem,StopSystem,RestartSystem,UpdateSystem,UpdateSCSInstance,CheckUpdateSystem,AccessCheck,GetProcessParameter,SetProcessParameter,SetProcessParameter2,CheckParameter,ShmDetach,GetNetworkId,GetSecNetworkId,RequestLogonFile,CreateSnapshot,ReadSnapshot,ListSnapshots,DeleteSnapshots,GetCallstack,ABAPReadSyslog,ABAPReadRawSyslog,ABAPGetWPTable,ABAPAcknowledgeAlerts,ABAPGetComponentList,ABAPCheckRFCDestinations,ABAPGetSystemWPTable,J2EEGetProcessList,J2EEGetProcessList2,J2EEControlProcess,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadCallStack,J2EEGetThreadTaskStack,J2EEGetSessionList,J2EEGetWebSessionList,J2EEGetWebSessionList2,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetApplicationAliasList,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetEJBSessionList,J2EEGetRemoteObjectList,J2EEGetClusterMsgList,J2EEGetSharedTableInfo,J2EEGetComponentList,J2EEControlComponents,ICMGetThreadList,ICMGetConnectionList,ICMGetCacheEntries,ICMGetProxyConnectionList,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,EnqGetLockTable,EnqRemoveLocks,EnqRemoveUserLocks,EnqGetStatistic,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,UpdateSystemPKI,UpdateInstancePSE,StorePSE,DeletePSE,CheckPSE,HACheckConfig,HACheckFailoverConfig,HAGetFailoverConfig,HAFailoverToNode,HASetMaintenanceMode,HACheckMaintenanceMode,ListConfigFiles,ReadConfigFile", + "property": "Webmethods", + "propertytype": "Attribute" + }, + "Process List": { + "value": "GetProcessList", + "property": "Process List", + "propertytype": "NodeWebmethod" + }, + "SAPLOCALHOST": { + "value": "vmhdbdev02", + "property": "SAPLOCALHOST", + "propertytype": "Attribute" + }, + "Access Points": { + "value": "GetAccessPointList", + "property": "Access Points", + "propertytype": "NodeWebmethod" + }, + "INSTANCE_NAME": { + "value": "HDB10", + "property": "INSTANCE_NAME", + "propertytype": "Attribute" + }, + "SAPSYSTEMNAME": { + "value": "HDD", + "property": "SAPSYSTEMNAME", + "propertytype": "Attribute" + }, + "StartPriority": { + "value": "0.3", + "property": "StartPriority", + "propertytype": "Attribute" + }, + "Protected Webmethods": { + "value": "ABAPAcknowledgeAlerts,ABAPCheckRFCDestinations,ABAPGetComponentList,ABAPGetSystemWPTable,ABAPGetWPTable,ABAPReadRawSyslog,ABAPReadSyslog,AnalyseLogFiles,Bootstrap,CheckParameter,CheckPSE,CheckUpdateSystem,ConfigureLogFileList,CreatePSECredential,CreateSnapshot,DeletePSE,DeleteSnapshots,EnqGetLockTable,EnqGetStatistic,EnqRemoveLocks,EnqRemoveUserLocks,GetAccessPointList,GetAlerts,GetAlertTree,GetCallstack,GetEnvironment,GetLogFileList,GetProcessParameter,GetQueueStatistic,GetStartProfile,GetSystemUpdateList,GetTraceFile,GetVersionInfo,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,HACheckConfig,HACheckFailoverConfig,HACheckMaintenanceMode,HAFailoverToNode,HAGetFailoverConfig,HASetMaintenanceMode,ICMGetCacheEntries,ICMGetConnectionList,ICMGetProxyConnectionList,ICMGetThreadList,InstanceStart,InstanceStop,J2EEControlCluster,J2EEControlComponents,J2EEControlProcess,J2EEDisableDbgSession,J2EEEnableDbgSession,J2EEGetApplicationAliasList,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetClusterMsgList,J2EEGetComponentList,J2EEGetEJBSessionList,J2EEGetProcessList,J2EEGetProcessList2,J2EEGetRemoteObjectList,J2EEGetSessionList,J2EEGetSharedTableInfo,J2EEGetThreadCallStack,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadTaskStack,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetWebSessionList,J2EEGetWebSessionList2,ListConfigFiles,ListDeveloperTraces,ListLogFiles,ListSnapshots,OSExecute,ParameterValue,ReadConfigFile,ReadDeveloperTrace,ReadLogFile,ReadSnapshot,RestartInstance,RestartService,RestartSystem,SendSignal,SetProcessParameter,SetProcessParameter2,ShmDetach,Shutdown,Start,StartBypassHA,StartSystem,Stop,StopBypassHA,StopService,StopSystem,StorePSE,UpdateInstancePSE,UpdateSCSInstance,UpdateSystem,UpdateSystemPKI,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,GetAgentConfig,GetListOfMaByCusGrp,GetMcInLocalMs,GetMtesByRequestTable,GetMtListByMtclass,InfoGetTree,MscCustomizeWrite,MscDeleteLines,MscReadCache,MsGetLocalMsInfo,MsGetMteclsInLocalMs,MtChangeStatus,MtCustomizeWrite,MtDbsetToWpsetByTid,MtDestroyMarkNTry,MteGetByToolRunstatus,MtGetAllToCust,MtGetAllToolsToSet,MtGetMteinfo,MtGetTidByName,MtRead,MtReset,PerfCustomizeWrite,PerfRead,PerfReadSmoothData,ReadDirectory,ReadFile,ReadProfileParameters,ReferenceRead,Register,RequestLogonFile,SnglmgsCustomizeWrite,SystemObjectSetValue,TextAttrRead,ToolGetEffective,ToolSet,ToolSetRuntimeStatus,TriggerDataCollection,Unregister,UtilAlChangeStatus,UtilMtGetAidByTid,UtilMtGetTreeLocal,UtilMtReadAll,UtilReadRawalertByAid,UtilSnglmsgReadRawdata", + "property": "Protected Webmethods", + "propertytype": "Attribute" + }, + "Parameter Documentation": { + "value": "http://vmhdbdev02:51013/sapparamEN.html", + "property": "Parameter Documentation", + "propertytype": "NodeURL" + } + } + }, + "HdbnsutilSRstate": { + "mode": "sync", + "online": "true", + "site_id": "2", + "isSource": "false", + "site_name": "WDF", + "isConsumer": "true", + "replayMode": "auto", + "hasConsumers": "false", + "siteTier/NBG": "1", + "siteTier/WDF": "2", + "operation_mode": "logreplay", + "primary_masters": "vmhdbdev01", + "siteMapping/NBG": "WDF", + "isTakeoverActive": "false", + "isPrimarySuspended": "false", + "mapping/vmhdbdev02": ["WDF/vmhdbdev02", "NBG/vmhdbdev01"], + "active_primary_site": "1", + "isTimetravelEnabled": "false", + "siteOperationMode/NBG": "primary", + "siteOperationMode/WDF": "logreplay", + "siteReplicationMode/NBG": "primary", + "siteReplicationMode/WDF": "sync" + }, + "HostConfiguration": { + "host": "vmhdbdev02", + "hostActive": "yes", + "hostStatus": "ok", + "removeStatus": "", + "failoverStatus": "", + "hostActualRoles": "worker", + "hostConfigRoles": "worker", + "storagePartition": "1", + "workerActualGroups": "default", + "workerConfigGroups": "default", + "failoverActualGroup": "default", + "failoverConfigGroup": "default", + "nameServerActualRole": "master", + "nameServerConfigRole": "master 1", + "indexServerActualRole": "master", + "indexServerConfigRole": "worker", + "storageActualPartition": "1", + "storageConfigPartition": "1" + }, + "SystemReplication": { + "local_site_id": "2", + "site/2/SITE_NAME": "WDF", + "site/2/SOURCE_SITE_ID": "1", + "site/2/PRIMARY_MASTERS": "vmhdbdev01", + "site/2/REPLICATION_MODE": "SYNC" + } + } + } + } + ] +} diff --git a/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json new file mode 100644 index 000000000..a56b8e51a --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json @@ -0,0 +1,230 @@ +{ + "agent_id": "0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4", + "discovery_type": "sap_system_discovery", + "payload": [ + { + "Id": "fd44c254ccb14331e54015c720c7a1f2", + "SID": "HDD", + "Type": 1, + "Profile": { + "SAPGLOBALHOST": "vmhdbdev02", + "SAPSYSTEMNAME": "HDD", + "hdbConfigType": "DEFAULT", + "ssl/ciphersuites": "135:PFS:HIGH::EC_P256:EC_HIGH", + "HDB_LINKED_BINARIES": "yes", + "HDB_SHARED_BINARIES": "yes" + }, + "Databases": [ + { + "Host": "vmhdbdev02", + "User": "", + "Group": "", + "Active": "yes", + "UserId": "", + "GroupId": "", + "SqlPort": "31015", + "Database": "HDD", + "Container": "" + } + ], + "Instances": { + "HDB10": { + "Host": "vmhdbdev02", + "Name": "HDB10", + "Type": 1, + "SAPControl": { + "Instances": { + "vmhdbdev02": { + "features": "HDB|HDB_WORKER", + "hostname": "vmhdbdev02", + "httpPort": 51013, + "httpsPort": 51014, + "dispstatus": "SAPControl-YELLOW", + "instanceNr": 10, + "startPriority": "0.3" + } + }, + "Processes": { + "hdbdaemon": { + "pid": 24133, + "name": "hdbdaemon", + "starttime": "2022 01 11 12:57:31", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Daemon", + "elapsedtime": "151:54:31" + }, + "hdbxsengine": { + "pid": 24925, + "name": "hdbxsengine", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB XSEngine-HDD", + "elapsedtime": "151:54:17" + }, + "hdbnameserver": { + "pid": 24153, + "name": "hdbnameserver", + "starttime": "2022 01 11 12:57:32", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Nameserver", + "elapsedtime": "151:54:30" + }, + "hdbindexserver": { + "pid": 24916, + "name": "hdbindexserver", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Indexserver-HDD", + "elapsedtime": "151:54:17" + }, + "hdbpreprocessor": { + "pid": 24822, + "name": "hdbpreprocessor", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Preprocessor", + "elapsedtime": "151:54:18" + }, + "hdbcompileserver": { + "pid": 24819, + "name": "hdbcompileserver", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Compileserver", + "elapsedtime": "151:54:18" + }, + "hdbwebdispatcher": { + "pid": 25653, + "name": "hdbwebdispatcher", + "starttime": "2022 01 11 12:57:53", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Web Dispatcher", + "elapsedtime": "151:54:09" + } + }, + "Properties": { + "SAPSYSTEM": { + "value": "10", + "property": "SAPSYSTEM", + "propertytype": "Attribute" + }, + "DBServices": { + "value": "YES", + "property": "DBServices", + "propertytype": "Attribute" + }, + "HANA Roles": { + "value": "worker", + "property": "HANA Roles", + "propertytype": "Attribute" + }, + "Webmethods": { + "value": "Start,InstanceStart,StartBypassHA,Bootstrap,Stop,InstanceStop,StopBypassHA,Shutdown,ParameterValue,GetProcessList,GetStartProfile,GetTraceFile,GetAlertTree,GetAlerts,RestartService,StopService,GetEnvironment,ListDeveloperTraces,ReadDeveloperTrace,RestartInstance,SendSignal,GetVersionInfo,GetQueueStatistic,GetInstanceProperties,OSExecute,ReadLogFile,AnalyseLogFiles,ListLogFiles,GetAccessPointList,GetSystemInstanceList,GetSystemUpdateList,StartSystem,StopSystem,RestartSystem,UpdateSystem,UpdateSCSInstance,CheckUpdateSystem,AccessCheck,GetProcessParameter,SetProcessParameter,SetProcessParameter2,CheckParameter,ShmDetach,GetNetworkId,GetSecNetworkId,RequestLogonFile,CreateSnapshot,ReadSnapshot,ListSnapshots,DeleteSnapshots,GetCallstack,ABAPReadSyslog,ABAPReadRawSyslog,ABAPGetWPTable,ABAPAcknowledgeAlerts,ABAPGetComponentList,ABAPCheckRFCDestinations,ABAPGetSystemWPTable,J2EEGetProcessList,J2EEGetProcessList2,J2EEControlProcess,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadCallStack,J2EEGetThreadTaskStack,J2EEGetSessionList,J2EEGetWebSessionList,J2EEGetWebSessionList2,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetApplicationAliasList,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetEJBSessionList,J2EEGetRemoteObjectList,J2EEGetClusterMsgList,J2EEGetSharedTableInfo,J2EEGetComponentList,J2EEControlComponents,ICMGetThreadList,ICMGetConnectionList,ICMGetCacheEntries,ICMGetProxyConnectionList,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,EnqGetLockTable,EnqRemoveLocks,EnqRemoveUserLocks,EnqGetStatistic,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,UpdateSystemPKI,UpdateInstancePSE,StorePSE,DeletePSE,CheckPSE,HACheckConfig,HACheckFailoverConfig,HAGetFailoverConfig,HAFailoverToNode,HASetMaintenanceMode,HACheckMaintenanceMode,ListConfigFiles,ReadConfigFile", + "property": "Webmethods", + "propertytype": "Attribute" + }, + "Process List": { + "value": "GetProcessList", + "property": "Process List", + "propertytype": "NodeWebmethod" + }, + "SAPLOCALHOST": { + "value": "vmhdbdev02", + "property": "SAPLOCALHOST", + "propertytype": "Attribute" + }, + "Access Points": { + "value": "GetAccessPointList", + "property": "Access Points", + "propertytype": "NodeWebmethod" + }, + "INSTANCE_NAME": { + "value": "HDB10", + "property": "INSTANCE_NAME", + "propertytype": "Attribute" + }, + "SAPSYSTEMNAME": { + "value": "HDD", + "property": "SAPSYSTEMNAME", + "propertytype": "Attribute" + }, + "StartPriority": { + "value": "0.3", + "property": "StartPriority", + "propertytype": "Attribute" + }, + "Protected Webmethods": { + "value": "ABAPAcknowledgeAlerts,ABAPCheckRFCDestinations,ABAPGetComponentList,ABAPGetSystemWPTable,ABAPGetWPTable,ABAPReadRawSyslog,ABAPReadSyslog,AnalyseLogFiles,Bootstrap,CheckParameter,CheckPSE,CheckUpdateSystem,ConfigureLogFileList,CreatePSECredential,CreateSnapshot,DeletePSE,DeleteSnapshots,EnqGetLockTable,EnqGetStatistic,EnqRemoveLocks,EnqRemoveUserLocks,GetAccessPointList,GetAlerts,GetAlertTree,GetCallstack,GetEnvironment,GetLogFileList,GetProcessParameter,GetQueueStatistic,GetStartProfile,GetSystemUpdateList,GetTraceFile,GetVersionInfo,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,HACheckConfig,HACheckFailoverConfig,HACheckMaintenanceMode,HAFailoverToNode,HAGetFailoverConfig,HASetMaintenanceMode,ICMGetCacheEntries,ICMGetConnectionList,ICMGetProxyConnectionList,ICMGetThreadList,InstanceStart,InstanceStop,J2EEControlCluster,J2EEControlComponents,J2EEControlProcess,J2EEDisableDbgSession,J2EEEnableDbgSession,J2EEGetApplicationAliasList,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetClusterMsgList,J2EEGetComponentList,J2EEGetEJBSessionList,J2EEGetProcessList,J2EEGetProcessList2,J2EEGetRemoteObjectList,J2EEGetSessionList,J2EEGetSharedTableInfo,J2EEGetThreadCallStack,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadTaskStack,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetWebSessionList,J2EEGetWebSessionList2,ListConfigFiles,ListDeveloperTraces,ListLogFiles,ListSnapshots,OSExecute,ParameterValue,ReadConfigFile,ReadDeveloperTrace,ReadLogFile,ReadSnapshot,RestartInstance,RestartService,RestartSystem,SendSignal,SetProcessParameter,SetProcessParameter2,ShmDetach,Shutdown,Start,StartBypassHA,StartSystem,Stop,StopBypassHA,StopService,StopSystem,StorePSE,UpdateInstancePSE,UpdateSCSInstance,UpdateSystem,UpdateSystemPKI,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,GetAgentConfig,GetListOfMaByCusGrp,GetMcInLocalMs,GetMtesByRequestTable,GetMtListByMtclass,InfoGetTree,MscCustomizeWrite,MscDeleteLines,MscReadCache,MsGetLocalMsInfo,MsGetMteclsInLocalMs,MtChangeStatus,MtCustomizeWrite,MtDbsetToWpsetByTid,MtDestroyMarkNTry,MteGetByToolRunstatus,MtGetAllToCust,MtGetAllToolsToSet,MtGetMteinfo,MtGetTidByName,MtRead,MtReset,PerfCustomizeWrite,PerfRead,PerfReadSmoothData,ReadDirectory,ReadFile,ReadProfileParameters,ReferenceRead,Register,RequestLogonFile,SnglmgsCustomizeWrite,SystemObjectSetValue,TextAttrRead,ToolGetEffective,ToolSet,ToolSetRuntimeStatus,TriggerDataCollection,Unregister,UtilAlChangeStatus,UtilMtGetAidByTid,UtilMtGetTreeLocal,UtilMtReadAll,UtilReadRawalertByAid,UtilSnglmsgReadRawdata", + "property": "Protected Webmethods", + "propertytype": "Attribute" + }, + "Parameter Documentation": { + "value": "http://vmhdbdev02:51013/sapparamEN.html", + "property": "Parameter Documentation", + "propertytype": "NodeURL" + } + } + }, + "HdbnsutilSRstate": { + "mode": "sync", + "online": "true", + "site_id": "2", + "isSource": "false", + "site_name": "WDF", + "isConsumer": "true", + "replayMode": "auto", + "hasConsumers": "false", + "siteTier/NBG": "1", + "siteTier/WDF": "2", + "operation_mode": "logreplay", + "primary_masters": "vmhdbdev01", + "siteMapping/NBG": "WDF", + "isTakeoverActive": "false", + "isPrimarySuspended": "false", + "mapping/vmhdbdev02": ["WDF/vmhdbdev02", "NBG/vmhdbdev01"], + "active_primary_site": "1", + "isTimetravelEnabled": "false", + "siteOperationMode/NBG": "primary", + "siteOperationMode/WDF": "logreplay", + "siteReplicationMode/NBG": "primary", + "siteReplicationMode/WDF": "sync" + }, + "HostConfiguration": { + "host": "vmhdbdev02", + "hostActive": "yes", + "hostStatus": "ok", + "removeStatus": "", + "failoverStatus": "", + "hostActualRoles": "worker", + "hostConfigRoles": "worker", + "storagePartition": "1", + "workerActualGroups": "default", + "workerConfigGroups": "default", + "failoverActualGroup": "default", + "failoverConfigGroup": "default", + "nameServerActualRole": "master", + "nameServerConfigRole": "master 1", + "indexServerActualRole": "master", + "indexServerConfigRole": "worker", + "storageActualPartition": "1", + "storageConfigPartition": "1" + }, + "SystemReplication": { + "local_site_id": "2", + "site/2/SITE_NAME": "WDF", + "site/2/SOURCE_SITE_ID": "1", + "site/2/PRIMARY_MASTERS": "vmhdbdev01", + "site/2/REPLICATION_MODE": "SYNC" + } + } + } + } + ] +} diff --git a/test/e2e/cypress/fixtures/hana-database-details/hana_database_details.feature b/test/e2e/cypress/fixtures/hana-database-details/hana_database_details.feature new file mode 100644 index 000000000..02ba59df5 --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/hana_database_details.feature @@ -0,0 +1,49 @@ +Feature: HANA database details view + This is where the user has a detailed view of the status of one specific discovered HANA database + + Background: + Given a discovered HANA database within a SAP deployment with the following properties + # Id: 'fd44c254ccb14331e54015c720c7a1f2', + # Sid: 'HDD', + # Hosts: ['vmhdbdev01', 'vmhdbdev02'] + And 2 hosts associated to the HANA database + + Scenario: Detailed view of one specific HANA database is available + When I navigate to a specific HANA database ('/databases/fd44c254ccb14331e54015c720c7a1f2') + Then the displayed HANA database SID is correct + And the displayed HANA database has "HANA Database" type + + Scenario: Not found is given when the HANA database is not available + When I navigate to a specific HANA database ('/databases/other') + Then Not found message is displayed + + Scenario: HANA database instances are properly shown + Given I navigate to a specific HANA database ('/databases/fd44c254ccb14331e54015c720c7a1f2') + Then 2 instances are displayed + And the data of each instance is correct + And the status of each instance is GREEN + + Scenario: HANA database instances status change event is received + Given I navigate to a specific HANA database ('/databases/fd44c254ccb14331e54015c720c7a1f2') + When a new HANA database event for this database with the 1st instance with a GRAY status is received + And the page is refreshed + Then the status of the 1st instance is GRAY + When a new HANA database event for this database with the 1st instance with a GREEN status is received + And the page is refreshed + Then the status of the 1st instance is GREEN + When a new HANA database event for this database with the 1st instance with a YELLOW status is received + And the page is refreshed + Then the status of the 1st instance is YELLOW + When a new HANA database event for this database with the 1st instance with a RED status is received + And the page is refreshed + Then the status of the 1st instance is RED + + Scenario: New instance is discovered in the HANA database + Given I navigate to a specific HANA database ('/databases/fd44c254ccb14331e54015c720c7a1f2') + When a new instance is discovered in a new agent + Then the new instace is added in the layout table + + Scenario: The hosts table shows all associated hosts + Given I navigate to a specific HANA database ('/databases/fd44c254ccb14331e54015c720c7a1f2') + Then the hosts table shows all the associated hosts + And each host has correct data diff --git a/test/e2e/cypress/fixtures/hana-database-details/newagent_sap_system_discovery_new.json b/test/e2e/cypress/fixtures/hana-database-details/newagent_sap_system_discovery_new.json new file mode 100644 index 000000000..80fb92d95 --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/newagent_sap_system_discovery_new.json @@ -0,0 +1,230 @@ +{ + "agent_id": "newagent", + "discovery_type": "sap_system_discovery", + "payload": [ + { + "Id": "fd44c254ccb14331e54015c720c7a1f2", + "SID": "HDD", + "Type": 1, + "Profile": { + "SAPGLOBALHOST": "vmhdbdev02", + "SAPSYSTEMNAME": "HDD", + "hdbConfigType": "DEFAULT", + "ssl/ciphersuites": "135:PFS:HIGH::EC_P256:EC_HIGH", + "HDB_LINKED_BINARIES": "yes", + "HDB_SHARED_BINARIES": "yes" + }, + "Databases": [ + { + "Host": "vmhdbdev02", + "User": "", + "Group": "", + "Active": "yes", + "UserId": "", + "GroupId": "", + "SqlPort": "31015", + "Database": "HDD", + "Container": "" + } + ], + "Instances": { + "HDB10": { + "Host": "vmhdbdev02", + "Name": "HDB10", + "Type": 1, + "SAPControl": { + "Instances": { + "newinstance": { + "features": "HDB|HDB_WORKER", + "hostname": "newinstance", + "httpPort": 12345, + "httpsPort": 12345, + "dispstatus": "SAPControl-GRAY", + "instanceNr": 99, + "startPriority": "0.3" + } + }, + "Processes": { + "hdbdaemon": { + "pid": 24133, + "name": "hdbdaemon", + "starttime": "2022 01 11 12:57:31", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Daemon", + "elapsedtime": "151:54:31" + }, + "hdbxsengine": { + "pid": 24925, + "name": "hdbxsengine", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB XSEngine-HDD", + "elapsedtime": "151:54:17" + }, + "hdbnameserver": { + "pid": 24153, + "name": "hdbnameserver", + "starttime": "2022 01 11 12:57:32", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Nameserver", + "elapsedtime": "151:54:30" + }, + "hdbindexserver": { + "pid": 24916, + "name": "hdbindexserver", + "starttime": "2022 01 11 12:57:45", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Indexserver-HDD", + "elapsedtime": "151:54:17" + }, + "hdbpreprocessor": { + "pid": 24822, + "name": "hdbpreprocessor", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Preprocessor", + "elapsedtime": "151:54:18" + }, + "hdbcompileserver": { + "pid": 24819, + "name": "hdbcompileserver", + "starttime": "2022 01 11 12:57:44", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Compileserver", + "elapsedtime": "151:54:18" + }, + "hdbwebdispatcher": { + "pid": 25653, + "name": "hdbwebdispatcher", + "starttime": "2022 01 11 12:57:53", + "dispstatus": "SAPControl-GREEN", + "textstatus": "Running", + "description": "HDB Web Dispatcher", + "elapsedtime": "151:54:09" + } + }, + "Properties": { + "SAPSYSTEM": { + "value": "99", + "property": "SAPSYSTEM", + "propertytype": "Attribute" + }, + "DBServices": { + "value": "YES", + "property": "DBServices", + "propertytype": "Attribute" + }, + "HANA Roles": { + "value": "worker", + "property": "HANA Roles", + "propertytype": "Attribute" + }, + "Webmethods": { + "value": "Start,InstanceStart,StartBypassHA,Bootstrap,Stop,InstanceStop,StopBypassHA,Shutdown,ParameterValue,GetProcessList,GetStartProfile,GetTraceFile,GetAlertTree,GetAlerts,RestartService,StopService,GetEnvironment,ListDeveloperTraces,ReadDeveloperTrace,RestartInstance,SendSignal,GetVersionInfo,GetQueueStatistic,GetInstanceProperties,OSExecute,ReadLogFile,AnalyseLogFiles,ListLogFiles,GetAccessPointList,GetSystemInstanceList,GetSystemUpdateList,StartSystem,StopSystem,RestartSystem,UpdateSystem,UpdateSCSInstance,CheckUpdateSystem,AccessCheck,GetProcessParameter,SetProcessParameter,SetProcessParameter2,CheckParameter,ShmDetach,GetNetworkId,GetSecNetworkId,RequestLogonFile,CreateSnapshot,ReadSnapshot,ListSnapshots,DeleteSnapshots,GetCallstack,ABAPReadSyslog,ABAPReadRawSyslog,ABAPGetWPTable,ABAPAcknowledgeAlerts,ABAPGetComponentList,ABAPCheckRFCDestinations,ABAPGetSystemWPTable,J2EEGetProcessList,J2EEGetProcessList2,J2EEControlProcess,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadCallStack,J2EEGetThreadTaskStack,J2EEGetSessionList,J2EEGetWebSessionList,J2EEGetWebSessionList2,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetApplicationAliasList,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetEJBSessionList,J2EEGetRemoteObjectList,J2EEGetClusterMsgList,J2EEGetSharedTableInfo,J2EEGetComponentList,J2EEControlComponents,ICMGetThreadList,ICMGetConnectionList,ICMGetCacheEntries,ICMGetProxyConnectionList,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,EnqGetLockTable,EnqRemoveLocks,EnqRemoveUserLocks,EnqGetStatistic,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,UpdateSystemPKI,UpdateInstancePSE,StorePSE,DeletePSE,CheckPSE,HACheckConfig,HACheckFailoverConfig,HAGetFailoverConfig,HAFailoverToNode,HASetMaintenanceMode,HACheckMaintenanceMode,ListConfigFiles,ReadConfigFile", + "property": "Webmethods", + "propertytype": "Attribute" + }, + "Process List": { + "value": "GetProcessList", + "property": "Process List", + "propertytype": "NodeWebmethod" + }, + "SAPLOCALHOST": { + "value": "vmhdbdev02", + "property": "SAPLOCALHOST", + "propertytype": "Attribute" + }, + "Access Points": { + "value": "GetAccessPointList", + "property": "Access Points", + "propertytype": "NodeWebmethod" + }, + "INSTANCE_NAME": { + "value": "HDB10", + "property": "INSTANCE_NAME", + "propertytype": "Attribute" + }, + "SAPSYSTEMNAME": { + "value": "HDD", + "property": "SAPSYSTEMNAME", + "propertytype": "Attribute" + }, + "StartPriority": { + "value": "0.3", + "property": "StartPriority", + "propertytype": "Attribute" + }, + "Protected Webmethods": { + "value": "ABAPAcknowledgeAlerts,ABAPCheckRFCDestinations,ABAPGetComponentList,ABAPGetSystemWPTable,ABAPGetWPTable,ABAPReadRawSyslog,ABAPReadSyslog,AnalyseLogFiles,Bootstrap,CheckParameter,CheckPSE,CheckUpdateSystem,ConfigureLogFileList,CreatePSECredential,CreateSnapshot,DeletePSE,DeleteSnapshots,EnqGetLockTable,EnqGetStatistic,EnqRemoveLocks,EnqRemoveUserLocks,GetAccessPointList,GetAlerts,GetAlertTree,GetCallstack,GetEnvironment,GetLogFileList,GetProcessParameter,GetQueueStatistic,GetStartProfile,GetSystemUpdateList,GetTraceFile,GetVersionInfo,GWCancelConnections,GWDeleteClients,GWDeleteConnections,GWGetConnectionList,GWGetClientList,HACheckConfig,HACheckFailoverConfig,HACheckMaintenanceMode,HAFailoverToNode,HAGetFailoverConfig,HASetMaintenanceMode,ICMGetCacheEntries,ICMGetConnectionList,ICMGetProxyConnectionList,ICMGetThreadList,InstanceStart,InstanceStop,J2EEControlCluster,J2EEControlComponents,J2EEControlProcess,J2EEDisableDbgSession,J2EEEnableDbgSession,J2EEGetApplicationAliasList,J2EEGetCacheStatistic,J2EEGetCacheStatistic2,J2EEGetClusterMsgList,J2EEGetComponentList,J2EEGetEJBSessionList,J2EEGetProcessList,J2EEGetProcessList2,J2EEGetRemoteObjectList,J2EEGetSessionList,J2EEGetSharedTableInfo,J2EEGetThreadCallStack,J2EEGetThreadList,J2EEGetThreadList2,J2EEGetThreadTaskStack,J2EEGetVMGCHistory,J2EEGetVMGCHistory2,J2EEGetVMHeapInfo,J2EEGetWebSessionList,J2EEGetWebSessionList2,ListConfigFiles,ListDeveloperTraces,ListLogFiles,ListSnapshots,OSExecute,ParameterValue,ReadConfigFile,ReadDeveloperTrace,ReadLogFile,ReadSnapshot,RestartInstance,RestartService,RestartSystem,SendSignal,SetProcessParameter,SetProcessParameter2,ShmDetach,Shutdown,Start,StartBypassHA,StartSystem,Stop,StopBypassHA,StopService,StopSystem,StorePSE,UpdateInstancePSE,UpdateSCSInstance,UpdateSystem,UpdateSystemPKI,WebDispGetServerList,WebDispGetGroupList,WebDispGetVirtHostList,WebDispGetUrlPrefixList,GetAgentConfig,GetListOfMaByCusGrp,GetMcInLocalMs,GetMtesByRequestTable,GetMtListByMtclass,InfoGetTree,MscCustomizeWrite,MscDeleteLines,MscReadCache,MsGetLocalMsInfo,MsGetMteclsInLocalMs,MtChangeStatus,MtCustomizeWrite,MtDbsetToWpsetByTid,MtDestroyMarkNTry,MteGetByToolRunstatus,MtGetAllToCust,MtGetAllToolsToSet,MtGetMteinfo,MtGetTidByName,MtRead,MtReset,PerfCustomizeWrite,PerfRead,PerfReadSmoothData,ReadDirectory,ReadFile,ReadProfileParameters,ReferenceRead,Register,RequestLogonFile,SnglmgsCustomizeWrite,SystemObjectSetValue,TextAttrRead,ToolGetEffective,ToolSet,ToolSetRuntimeStatus,TriggerDataCollection,Unregister,UtilAlChangeStatus,UtilMtGetAidByTid,UtilMtGetTreeLocal,UtilMtReadAll,UtilReadRawalertByAid,UtilSnglmsgReadRawdata", + "property": "Protected Webmethods", + "propertytype": "Attribute" + }, + "Parameter Documentation": { + "value": "http://vmhdbdev02:51013/sapparamEN.html", + "property": "Parameter Documentation", + "propertytype": "NodeURL" + } + } + }, + "HdbnsutilSRstate": { + "mode": "sync", + "online": "true", + "site_id": "2", + "isSource": "false", + "site_name": "WDF", + "isConsumer": "true", + "replayMode": "auto", + "hasConsumers": "false", + "siteTier/NBG": "1", + "siteTier/WDF": "2", + "operation_mode": "logreplay", + "primary_masters": "vmhdbdev01", + "siteMapping/NBG": "WDF", + "isTakeoverActive": "false", + "isPrimarySuspended": "false", + "mapping/vmhdbdev02": ["WDF/vmhdbdev02", "NBG/vmhdbdev01"], + "active_primary_site": "1", + "isTimetravelEnabled": "false", + "siteOperationMode/NBG": "primary", + "siteOperationMode/WDF": "logreplay", + "siteReplicationMode/NBG": "primary", + "siteReplicationMode/WDF": "sync" + }, + "HostConfiguration": { + "host": "vmhdbdev02", + "hostActive": "yes", + "hostStatus": "ok", + "removeStatus": "", + "failoverStatus": "", + "hostActualRoles": "worker", + "hostConfigRoles": "worker", + "storagePartition": "1", + "workerActualGroups": "default", + "workerConfigGroups": "default", + "failoverActualGroup": "default", + "failoverConfigGroup": "default", + "nameServerActualRole": "master", + "nameServerConfigRole": "master 1", + "indexServerActualRole": "master", + "indexServerConfigRole": "worker", + "storageActualPartition": "1", + "storageConfigPartition": "1" + }, + "SystemReplication": { + "local_site_id": "2", + "site/2/SITE_NAME": "WDF", + "site/2/SOURCE_SITE_ID": "1", + "site/2/PRIMARY_MASTERS": "vmhdbdev01", + "site/2/REPLICATION_MODE": "SYNC" + } + } + } + } + ] +} diff --git a/test/e2e/cypress/fixtures/hana-database-details/selected_database.js b/test/e2e/cypress/fixtures/hana-database-details/selected_database.js new file mode 100644 index 000000000..21e3d7fbb --- /dev/null +++ b/test/e2e/cypress/fixtures/hana-database-details/selected_database.js @@ -0,0 +1,48 @@ +export const selectedDatabase = { + Id: 'fd44c254ccb14331e54015c720c7a1f2', + Sid: 'HDD', + Type: 'HANA Database', + Hosts: [ + { + Hostname: 'vmhdbdev01', + Instance: '10', + Features: 'HDB|HDB_WORKER', + HttpPort: '51013', + HttpsPort: '51014', + StartPriority: '0.3', + Status: 'SAPControl-GREEN', + StatusBadge: 'badge-primary', + }, + { + Hostname: 'vmhdbdev02', + Instance: '10', + Features: 'HDB|HDB_WORKER', + HttpPort: '51013', + HttpsPort: '51014', + StartPriority: '0.3', + Status: 'SAPControl-GREEN', + StatusBadge: 'badge-primary', + }, + ], +}; + +export const attachedHosts = [ + { + Name: 'vmhdbdev01', + AgentId: '13e8c25c-3180-5a9a-95c8-51ec38e50cfc', + Address: '10.100.1.11, 10.100.1.13', + Provider: 'azure', + Cluster: 'hana_cluster', + ClusterId: '04b8f8c21f9fd8991224478e8c4362f8', + Version: '0.7.1+git.dev42.1640084952.33229fc', + }, + { + Name: 'vmhdbdev02', + AgentId: '0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4', + Address: '10.100.1.12', + Provider: 'azure', + Cluster: 'hana_cluster', + ClusterId: '04b8f8c21f9fd8991224478e8c4362f8', + Version: '0.7.1+git.dev42.1640084952.33229fc', + }, +]; diff --git a/test/e2e/cypress/integration/hana_database_details.js b/test/e2e/cypress/integration/hana_database_details.js new file mode 100644 index 000000000..11e30de7d --- /dev/null +++ b/test/e2e/cypress/integration/hana_database_details.js @@ -0,0 +1,119 @@ +import { agents } from '../fixtures/hosts-overview/available_hosts'; +import { + selectedDatabase, + attachedHosts, +} from '../fixtures/hana-database-details/selected_database'; + +context('HANA database details', () => { + before(() => { + cy.resetDatabase(); + cy.loadScenario('healthy-27-node-SAP-cluster'); + + cy.task('startAgentHeartbeat', agents()); + + cy.visit(`/databases/${selectedDatabase.Id}`); + cy.url().should('include', `/databases/${selectedDatabase.Id}`); + }); + + describe('HANA database details page is available', () => { + it(`should display the "${selectedDatabase.Sid}" database details page`, () => { + cy.visit(`/databases/${selectedDatabase.Id}`); + cy.url().should('include', `/databases/${selectedDatabase.Id}`); + cy.get('h1').should('contain', 'HANA Database details'); + cy.get('dd').eq(0).should('contain', selectedDatabase.Sid); + cy.get('dd').eq(1).should('contain', selectedDatabase.Type); + }); + + it(`should display "Not found" page when HANA database doesn't exist`, () => { + cy.visit(`/databases/other`, { failOnStatusCode: false }); + cy.url().should('include', `/databases/other`); + cy.get('h1').should('contain', 'Not Found'); + cy.get('p').should('contain', "The requested URL doesn't exist"); + }); + }); + + describe('The database layout shows all the running instances', () => { + before(() => { + cy.visit(`/databases/${selectedDatabase.Id}`); + cy.url().should('include', `/databases/${selectedDatabase.Id}`); + }); + + selectedDatabase.Hosts.forEach((instance, index) => { + it(`should show hostname "${instance.Hostname}" with the correct values`, () => { + cy.get('.eos-table') + .eq(0) + .find('tr') + .eq(index + 1) + .find('td') + .as('tableCell'); + cy.get('@tableCell').eq(0).should('contain', instance.Hostname); + cy.get('@tableCell').eq(1).should('contain', instance.Instance); + cy.get('@tableCell').eq(2).should('contain', instance.Features); + cy.get('@tableCell').eq(3).should('contain', instance.HttpPort); + cy.get('@tableCell').eq(4).should('contain', instance.HttpsPort); + cy.get('@tableCell').eq(5).should('contain', instance.StartPriority); + cy.get('@tableCell').eq(6).should('contain', instance.Status); + cy.get('@tableCell') + .eq(6) + .find('span') + .should('have.class', instance.StatusBadge); + }); + }); + + const states = [ + ['GRAY', 'secondary'], + ['GREEN', 'primary'], + ['YELLOW', 'warning'], + ['RED', 'danger'], + ]; + + states.forEach(([state, badge]) => { + it(`should show ${state} badge in instace when SAPControl-GRAY state is received`, () => { + cy.loadScenario(`hana-database-detail-${state}`); + cy.visit(`/databases/${selectedDatabase.Id}`); + // using row 2 as the changed instance is the 2nd in order based on instance_number + cy.get('.eos-table').eq(0).find('tr').eq(2).find('td').as('tableCell'); + cy.get('@tableCell').eq(6).should('contain', `SAPControl-${state}`); + cy.get('@tableCell') + .eq(6) + .find('span') + .should('have.class', `badge-${badge}`); + }); + }); + + it(`should show a new instance when an event with a new SAP instance is received`, () => { + cy.loadScenario(`hana-database-detail-NEW`); + cy.visit(`/databases/${selectedDatabase.Id}`); + cy.get('.eos-table').eq(0).find('tr').should('have.length', 4); + cy.get('.eos-table').eq(0).find('tr').eq(-1).find('td').as('tableCell'); + cy.get('@tableCell').eq(0).should('contain', 'newinstance'); + cy.get('@tableCell').eq(1).should('contain', '99'); + }); + }); + + describe('The hosts table shows the attached hosts to this HANA database', () => { + attachedHosts.forEach((host, index) => { + it(`should show ${host.Name} with the correct link and data`, () => { + cy.get('.eos-table') + .eq(1) + .find('tr') + .eq(index + 1) + .find('td') + .as('tableCell'); + cy.get('@tableCell').eq(1).should('contain', host.Name); + cy.get('@tableCell') + .eq(1) + .find('a') + .should('have.attr', 'href', `/hosts/${host.AgentId}`); + cy.get('@tableCell').eq(2).contains(host.Address); + cy.get('@tableCell').eq(3).should('contain', host.Provider); + cy.get('@tableCell').eq(4).should('contain', host.Cluster); + cy.get('@tableCell') + .eq(4) + .find('a') + .should('have.attr', 'href', `/clusters/${host.ClusterId}`); + cy.get('@tableCell').eq(5).should('contain', host.Version); + }); + }); + }); +});