Commit b3cc7aa2 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

fix version check (without schema)

parent be264865
......@@ -189,13 +189,14 @@
" });",
"",
" pm.test(pm.variables.get(\"test_prefix\") + \"Version OK\", function () {",
" versionNos = jsonData.version.split(\".\");",
" // if schema is not available, check (at least basically) if jsonData.version contains a valid version number",
" versionNos = jsonData.version.split(\".\", limit=3);",
" pm.expect(versionNos.length, \"Semantic version number with three components expected\").to.eql(3);",
" pm.expect(versionNos[0], \"Wrong major version!\").to.eql(pm.variables.get(\"EXPECTED_VERSION_MAJOR\"));",
" pm.expect(versionNos[1], \"Wrong minor version!\").to.eql(pm.variables.get(\"EXPECTED_VERSION_MINOR\"));",
"",
" buildNos = versionNos[2].split(\"-\", limit=2);",
" pm.expect(buildNos.length, \"Malformatted build number. Expected Number[-Text]\").to.be.oneOf([1,2]);",
" buildNos = versionNos[2].match(\"^\\\\d+(-.*)?(+.*)?$\") // very basic regex for build no",
" pm.expect(buildNos, \"Malformatted build number. Expected Number[-Text][+Text]\").to.not.be.null;",
" });",
"}",
"",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment