Skip to content

Commit

Permalink
fix: Add version number validation
Browse files Browse the repository at this point in the history
Signed-off-by: Cherry Wang <cherry@iotechsys.com>
  • Loading branch information
cherrycl committed Nov 11, 2024
1 parent e0c7175 commit cc65ad8
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TAF/config/global_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

LOG_LEVEL = "INFO"

# Release Version
REL_MAJOR_VERSION = "4.0"

# API Version
API_VERSION = "v3"

Expand Down
5 changes: 5 additions & 0 deletions TAF/testCaseModules/keywords/common/commonKeywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ apiVersion Should be ${API_VERSION}
Should contain "apiVersion"
Should be true '${content}[apiVersion]' == '${API_VERSION}'

Version Should Contain Release Version
${full_version} Fetch From Left ${content}[version] -
${version_num} Split String ${full_version} .
Should Be Equal As Strings ${REL_MAJOR_VERSION} ${version_num}[0].${version_num}[1]

totalCount Should be ${value}
Should contain ${content} totalCount
Should be true '${content}[totalCount]' == '${value}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And Should Return SDK Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ InfoGET001 - Query ping
InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And version
And Version Should Contain Release Version
And apiVersion Should be ${API_VERSION}
And Response Time Should Be Less Than "${default_response_time_threshold}"ms

Expand Down

0 comments on commit cc65ad8

Please sign in to comment.