Skip to content

Commit

Permalink
Merge pull request #920 from cherrycl/issue-919
Browse files Browse the repository at this point in the history
fix: Replace support-cron-scheduler with support-scheduler
  • Loading branch information
cloudxxx8 authored Nov 13, 2024
2 parents 7dee846 + 0ba715a commit 876a4dc
Show file tree
Hide file tree
Showing 26 changed files with 155 additions and 194 deletions.
4 changes: 2 additions & 2 deletions TAF/config/global_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
SUPPORT_NOTIFICATIONS_PORT = "8443/support-notifications"
RULESENGINE_PORT = "8443/rules-engine"
ONVIF_CAMERA_PORT = "8443/device-onvif-camera"
SUPPORT_CRON_SCHEDULER_PORT = "8443/support-cron-scheduler"
SUPPORT_SCHEDULER_PORT = "8443/support-scheduler"
else:
URI_SCHEME = "http"
CORE_DATA_PORT = 59880
Expand All @@ -56,7 +56,7 @@
SUPPORT_NOTIFICATIONS_PORT = 59860
RULESENGINE_PORT = 59720
ONVIF_CAMERA_PORT = 59984
SUPPORT_CRON_SCHEDULER_PORT = 59863
SUPPORT_SCHEDULER_PORT = 59863


# External MQTT Auth
Expand Down
8 changes: 4 additions & 4 deletions TAF/config/performance-metrics/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
METADATA_IMAGE = 28.35
COMMAND_IMAGE = 27.80
NOTIFICATIONS_IMAGE = 41.63
CRON_SCHEDULER_IMAGE = 71.09 # Use Odessa version size
SCHEDULER_IMAGE = 71.09 # Use Odessa version size
COMMON_CONFIG_IMAGE = 24.89
APP_SERVICE_CONFIGURABLE_IMAGE = 41.45
DEVICE_VIRTUAL_IMAGE = 40.76
Expand All @@ -45,7 +45,7 @@
METADATA_BINARY = 14.28
COMMAND_BINARY = 13.72
NOTIFICATIONS_BINARY = 26.83
CRON_SCHEDULER_BINARY = 54.42 # Use Odessa version size
SCHEDULER_BINARY = 54.42 # Use Odessa version size
COMMON_CONFIG_BINARY = 10.81
APP_SERVICE_CONFIGURABLE_BINARY = 26.63
DEVICE_VIRTUAL_BINARY = 26.66
Expand All @@ -68,7 +68,7 @@
METADATA_IMAGE_ARM64 = 28.33
COMMAND_IMAGE_ARM64 = 27.80
NOTIFICATIONS_IMAGE_ARM64 = 41.37
CRON_SCHEDULER_IMAGE_ARM64 = 71.09 # Use Odessa version size
SCHEDULER_IMAGE_ARM64 = 71.09 # Use Odessa version size
COMMON_CONFIG_IMAGE_ARM64 = 25.06
APP_SERVICE_CONFIGURABLE_IMAGE_ARM64 = 41.23
DEVICE_VIRTUAL_IMAGE_ARM64 = 40.39
Expand All @@ -91,7 +91,7 @@
METADATA_BINARY_ARM64 = 13.70
COMMAND_BINARY_ARM64 = 13.17
NOTIFICATIONS_BINARY_ARM64 = 25.91
CRON_SCHEDULER_BINARY_ARM64 = 54.42 # Use Odessa version size
SCHEDULER_BINARY_ARM64 = 54.42 # Use Odessa version size
COMMON_CONFIG_BINARY_ARM64 = 10.42
APP_SERVICE_CONFIGURABLE_BINARY_ARM64 = 25.75
DEVICE_VIRTUAL_BINARY_ARM64 = 25.73
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"edgex-core-metadata": {"binary": "/core-metadata"},
"edgex-core-command": {"binary": "/core-command"},
"edgex-support-notifications": {"binary": "/support-notifications"},
"edgex-support-cron-scheduler": {"binary": "/support-cron-scheduler"},
"edgex-support-scheduler": {"binary": "/support-scheduler"},
"edgex-core-common-config-bootstrapper": {"binary": "/core-common-config-bootstrapper"},
"edgex-app-rules-engine": {"binary": "/app-service-configurable"},
"edgex-device-virtual": {"binary": "/device-virtual"},
Expand All @@ -48,7 +48,7 @@
"edgex-core-metadata": {"imagesize": "{}".format(SettingsInfo().profile_constant.METADATA_IMAGE)},
"edgex-core-command": {"imagesize": "{}".format(SettingsInfo().profile_constant.COMMAND_IMAGE)},
"edgex-support-notifications": {"imagesize": "{}".format(SettingsInfo().profile_constant.NOTIFICATIONS_IMAGE)},
"edgex-support-cron-scheduler": {"imagesize": "{}".format(SettingsInfo().profile_constant.CRON_SCHEDULER_IMAGE)},
"edgex-support-scheduler": {"imagesize": "{}".format(SettingsInfo().profile_constant.SCHEDULER_IMAGE)},
"edgex-core-common-config-bootstrapper": {"imagesize": "{}".format(SettingsInfo().profile_constant.COMMON_CONFIG_IMAGE)},
"edgex-app-rules-engine": {"imagesize": "{}".format(SettingsInfo().profile_constant.APP_SERVICE_CONFIGURABLE_IMAGE)},
"edgex-device-virtual": {"imagesize": "{}".format(SettingsInfo().profile_constant.DEVICE_VIRTUAL_IMAGE)},
Expand All @@ -72,7 +72,7 @@
"edgex-core-metadata": {"imagesize": "{}".format(SettingsInfo().profile_constant.METADATA_IMAGE_ARM64)},
"edgex-core-command": {"imagesize": "{}".format(SettingsInfo().profile_constant.COMMAND_IMAGE_ARM64)},
"edgex-support-notifications": {"imagesize": "{}".format(SettingsInfo().profile_constant.NOTIFICATIONS_IMAGE_ARM64)},
"edgex-support-cron-scheduler": {"imagesize": "{}".format(SettingsInfo().profile_constant.CRON_SCHEDULER_IMAGE_ARM64)},
"edgex-support-scheduler": {"imagesize": "{}".format(SettingsInfo().profile_constant.SCHEDULER_IMAGE_ARM64)},
"edgex-core-common-config-bootstrapper": {"imagesize": "{}".format(SettingsInfo().profile_constant.COMMON_CONFIG_IMAGE_ARM64)},
"edgex-app-rules-engine": {"imagesize": "{}".format(SettingsInfo().profile_constant.APP_SERVICE_CONFIGURABLE_IMAGE_ARM64)},
"edgex-device-virtual": {"imagesize": "{}".format(SettingsInfo().profile_constant.DEVICE_VIRTUAL_IMAGE_ARM64)},
Expand All @@ -96,7 +96,7 @@
"edgex-core-metadata": {"binarysize": "{}".format(SettingsInfo().profile_constant.METADATA_BINARY)},
"edgex-core-command": {"binarysize": "{}".format(SettingsInfo().profile_constant.COMMAND_BINARY)},
"edgex-support-notifications": {"binarysize": "{}".format(SettingsInfo().profile_constant.NOTIFICATIONS_BINARY)},
"edgex-support-cron-scheduler": {"binarysize": "{}".format(SettingsInfo().profile_constant.CRON_SCHEDULER_BINARY)},
"edgex-support-scheduler": {"binarysize": "{}".format(SettingsInfo().profile_constant.SCHEDULER_BINARY)},
"edgex-core-common-config-bootstrapper": {"binarysize": "{}".format(SettingsInfo().profile_constant.COMMON_CONFIG_BINARY)},
"edgex-app-rules-engine": {"binarysize": "{}".format(SettingsInfo().profile_constant.APP_SERVICE_CONFIGURABLE_BINARY)},
"edgex-device-virtual": {"binarysize": "{}".format(SettingsInfo().profile_constant.DEVICE_VIRTUAL_BINARY)},
Expand All @@ -120,7 +120,7 @@
"edgex-core-metadata": {"binarysize": "{}".format(SettingsInfo().profile_constant.METADATA_BINARY_ARM64)},
"edgex-core-command": {"binarysize": "{}".format(SettingsInfo().profile_constant.COMMAND_BINARY_ARM64)},
"edgex-support-notifications": {"binarysize": "{}".format(SettingsInfo().profile_constant.NOTIFICATIONS_BINARY_ARM64)},
"edgex-support-cron-scheduler": {"binarysize": "{}".format(SettingsInfo().profile_constant.CRON_SCHEDULER_BINARY_ARM64)},
"edgex-support-scheduler": {"binarysize": "{}".format(SettingsInfo().profile_constant.SCHEDULER_BINARY_ARM64)},
"edgex-core-common-config-bootstrapper": {"binarysize": "{}".format(SettingsInfo().profile_constant.COMMON_CONFIG_BINARY_ARM64)},
"edgex-app-rules-engine": {"binarysize": "{}".format(SettingsInfo().profile_constant.APP_SERVICE_CONFIGURABLE_BINARY_ARM64)},
"edgex-device-virtual": {"binarysize": "{}".format(SettingsInfo().profile_constant.DEVICE_VIRTUAL_BINARY_ARM64)},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

global services
services = ["edgex-core-keeper", "edgex-core-data", "edgex-core-metadata", "edgex-core-command",
"edgex-support-notifications", "edgex-support-cron-scheduler", "edgex-core-common-config-bootstrapper",
"edgex-support-notifications", "edgex-support-scheduler", "edgex-core-common-config-bootstrapper",
"edgex-app-rules-engine", "edgex-device-virtual", "edgex-device-rest", "edgex-kuiper", "edgex-postgres"]

secty_services = ["edgex-security-secretstore-setup", "edgex-nginx", "edgex-secret-store", "edgex-security-bootstrapper"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"support-notifications": {"containerName": "edgex-support-notifications", "msgRegex": msgRegex,
"startupDatetimeRegex": startupDatetimeRegex,
"binaryStartupTimeRegex": binaryStartupTimeRegex},
"support-cron-scheduler": {"containerName": "edgex-support-cron-scheduler",
"support-scheduler": {"containerName": "edgex-support-scheduler",
"msgRegex": msgRegex, "startupDatetimeRegex": startupDatetimeRegex,
"binaryStartupTimeRegex": binaryStartupTimeRegex},
"app-service": {"containerName": "edgex-app-rules-engine",
Expand Down
4 changes: 2 additions & 2 deletions TAF/testCaseModules/keywords/setup/startup_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"support-notifications": {"composeName": "notifications",
"port": SettingsInfo().constant.SUPPORT_NOTIFICATIONS_PORT,
"pingUrl": "/api/{}/ping".format(SettingsInfo().constant.API_VERSION)},
"support-cron-scheduler": {"composeName": "cron-scheduler",
"port": SettingsInfo().constant.SUPPORT_CRON_SCHEDULER_PORT,
"support-scheduler": {"composeName": "scheduler",
"port": SettingsInfo().constant.SUPPORT_SCHEDULER_PORT,
"pingUrl": "/api/{}/ping".format(SettingsInfo().constant.API_VERSION)},
"device-virtual": {"composeName": "device-virtual",
"port": SERVICE_PORT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Library String
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot

*** Variables ***
${supportCronSchedulerUrl} ${URI_SCHEME}://${BASE_URL}:${SUPPORT_CRON_SCHEDULER_PORT}
${supportSchedulerUrl} ${URI_SCHEME}://${BASE_URL}:${SUPPORT_SCHEDULER_PORT}
${jobUri} /api/${API_VERSION}/job
${scheduleActionRecordUri} /api/${API_VERSION}/scheduleactionrecord
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/supportCronSchedulerAPI.log
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/supportSchedulerAPI.log

*** Keywords ***
## Job
Expand Down Expand Up @@ -45,7 +45,7 @@ Generate Job Action
General A Job Sample
[Arguments] ${definition} ${definition_interval} ${action} ${action_field1} ${action_field2}=${EMPTY}
... ${action_payload}=${EMPTY}
${job_data} Get File ${WORK_DIR}/TAF/testData/support-cron-scheduler/job.json encoding=UTF-8
${job_data} Get File ${WORK_DIR}/TAF/testData/support-scheduler/job.json encoding=UTF-8
${job} Evaluate json.loads('''${job_data}''') json
${currentTime} Get Current Milliseconds Epoch Time
${name} Set Variable job_${currentTime}
Expand Down Expand Up @@ -94,27 +94,27 @@ Generate Multiple Job

Create Jobs
[Arguments] ${entity}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} POST On Session Support Cron Scheduler ${jobUri} json=${entity} headers=${headers}
${resp} POST On Session Support Scheduler ${jobUri} json=${entity} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 207 log to console ${content}

Update Jobs
[Arguments] ${entity}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} PATCH On Session Support Cron Scheduler ${jobUri} json=${entity} headers=${headers}
${resp} PATCH On Session Support Scheduler ${jobUri} json=${entity} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 207 log to console ${content}

Delete Job By Name
[Arguments] ${name}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} DELETE On Session Support Cron Scheduler ${jobUri}/name/${name} headers=${headers}
${resp} DELETE On Session Support Scheduler ${jobUri}/name/${name} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}
Expand All @@ -127,26 +127,26 @@ Delete Multiple Jobs

Query Job By Name
[Arguments] ${name}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${jobUri}/name/${name} headers=${headers}
${resp} GET On Session Support Scheduler ${jobUri}/name/${name} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query All Jobs
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${jobUri}/all headers=${headers}
${resp} GET On Session Support Scheduler ${jobUri}/all headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Trigger Job By Name
[Arguments] ${name}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} POST On Session Support Cron Scheduler ${jobUri}/trigger/name/${name} headers=${headers}
${resp} POST On Session Support Scheduler ${jobUri}/trigger/name/${name} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 202 log to console ${content}
Expand All @@ -166,52 +166,52 @@ Create A Job
## Query Schedule Action Record
Query Schedule Action Record By Job Name
[Arguments] ${name}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/job/name/${name} headers=${headers}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/job/name/${name} headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query All Schedule Action Record
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/all headers=${headers}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/all headers=${headers}
... expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query All Schedule Action Record With ${parameter}=${value}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/all params=${parameter}=${value}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/all params=${parameter}=${value}
... headers=${headers} expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query Latest Schedule Action Record By Job Name
[Arguments] ${name}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/latest/job/name/${name}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/latest/job/name/${name}
... headers=${headers} expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query Schedule Action Record By Status
[Arguments] ${status}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/status/${status}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/status/${status}
... headers=${headers} expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}

Query Schedule Action Record By Job Name And Status
[Arguments] ${name} ${status}
Create Session Support Cron Scheduler url=${supportCronSchedulerUrl} disable_warnings=true
Create Session Support Scheduler url=${supportSchedulerUrl} disable_warnings=true
${headers} Create Dictionary Content-Type=application/json Authorization=Bearer ${jwt_token}
${resp} GET On Session Support Cron Scheduler ${scheduleActionRecordUri}/job/name/${name}/status/${status}
${resp} GET On Session Support Scheduler ${scheduleActionRecordUri}/job/name/${name}/status/${status}
... headers=${headers} expected_status=any
Set Response to Test Variables ${resp}
Run Keyword If ${response} != 200 log to console ${content}
Expand Down
5 changes: 0 additions & 5 deletions TAF/testData/support-scheduler/interval.json

This file was deleted.

34 changes: 0 additions & 34 deletions TAF/testData/support-scheduler/interval_action.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
*** Settings ***
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot
Resource TAF/testCaseModules/keywords/support-cron-scheduler/supportCronSchedulerAPI.robot
Resource TAF/testCaseModules/keywords/support-scheduler/supportSchedulerAPI.robot
Suite Setup Run Keywords Setup Suite
... AND Run Keyword if $SECURITY_SERVICE_NEEDED == 'true' Get Token
Suite Teardown Run Teardown Keywords

*** Variables ***
${SUITE} Support Cron Scheduler Info GET Test Cases
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/support-cron-scheduler-info.log
${url} ${supportCronSchedulerUrl}
${SUITE} Support Scheduler Info GET Test Cases
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/support-scheduler-info.log
${url} ${supportSchedulerUrl}

*** Test Cases ***
InfoGET001 - Query ping
Expand Down
Loading

0 comments on commit 876a4dc

Please sign in to comment.