Fixed Create Flavor Tests
Rather than skip all the negative tests, I added the ability to specify which scenario's in the ddt file to skip. For now this is just the limit checks that are not implemented. The Negative test to check the invalid href was not a valid test so it has been removed. Ie the href was still valid. With unicode I dont believe there are any invalid hrefs. Closes-Bug: 1394718 Change-Id: Icc8550d63b77ed977001c1f6417bbce888307df4
This commit is contained in:
parent
dbd6e05fc7
commit
173fe7686b
@ -45,20 +45,14 @@
|
|||||||
"provider_list": [
|
"provider_list": [
|
||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "", "rel": "provider_url"}]}]},
|
"links": [{"href": "", "rel": "provider_url"}]}]},
|
||||||
"invalid_href": {
|
|
||||||
"limits": [
|
|
||||||
{"origins": {"min": 1, "max": 5}},
|
|
||||||
{"domains": {"min": 1, "max": 5}},
|
|
||||||
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
|
|
||||||
"provider_list": [
|
|
||||||
{"provider": "fastly",
|
|
||||||
"links": [{"href": "watermelon", "rel": "provider_url"}]}]},
|
|
||||||
"empty_limits": {
|
"empty_limits": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [],
|
"limits": [],
|
||||||
"provider_list": [
|
"provider_list": [
|
||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "watermelon", "rel": "provider_url"}]}]},
|
"links": [{"href": "watermelon", "rel": "provider_url"}]}]},
|
||||||
"missing_limits_origins": {
|
"missing_limits_origins": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
|
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
|
||||||
@ -66,6 +60,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"missing_limits_domains": {
|
"missing_limits_domains": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
|
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
|
||||||
@ -73,6 +68,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"missing_limits_caching": {
|
"missing_limits_caching": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": 5}},
|
{"origins": {"min": 1, "max": 5}},
|
||||||
{"domains": {"min": 1, "max": 5}}],
|
{"domains": {"min": 1, "max": 5}}],
|
||||||
@ -80,6 +76,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"empty_limits_origins": {
|
"empty_limits_origins": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {}},
|
{"origins": {}},
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
@ -88,6 +85,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"empty_limits_domains": {
|
"empty_limits_domains": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": 5}},
|
{"origins": {"min": 1, "max": 5}},
|
||||||
{"domains": {}},
|
{"domains": {}},
|
||||||
@ -96,6 +94,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"empty_limits_caching": {
|
"empty_limits_caching": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": 5}},
|
{"origins": {"min": 1, "max": 5}},
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
@ -104,6 +103,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"invalid_limits_origins": {
|
"invalid_limits_origins": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": -5}},
|
{"origins": {"min": 1, "max": -5}},
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
@ -112,6 +112,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"invalid_limits_domains": {
|
"invalid_limits_domains": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": 5}},
|
{"origins": {"min": 1, "max": 5}},
|
||||||
{"domains": {"min": 100000000000000000000000000000000000000, "max": 5}},
|
{"domains": {"min": 100000000000000000000000000000000000000, "max": 5}},
|
||||||
@ -120,6 +121,7 @@
|
|||||||
{"provider": "fastly",
|
{"provider": "fastly",
|
||||||
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
|
||||||
"invalid_limits_caching": {
|
"invalid_limits_caching": {
|
||||||
|
"skip_test": true,
|
||||||
"limits": [
|
"limits": [
|
||||||
{"origins": {"min": 1, "max": 5}},
|
{"origins": {"min": 1, "max": 5}},
|
||||||
{"domains": {"min": 1, "max": 5}},
|
{"domains": {"min": 1, "max": 5}},
|
||||||
|
@ -57,7 +57,9 @@ class TestCreateFlavors(base.TestBase):
|
|||||||
|
|
||||||
@ddt.file_data('data_create_flavor_negative.json')
|
@ddt.file_data('data_create_flavor_negative.json')
|
||||||
def test_create_flavor_negative_tests(self, test_data):
|
def test_create_flavor_negative_tests(self, test_data):
|
||||||
self.skipTest('Not Implemented - bp# post-flavors-error-handling')
|
if 'skip_test' in test_data:
|
||||||
|
self.skipTest('Not Implemented - bp# post-flavors-error-handling')
|
||||||
|
|
||||||
provider_list = test_data['provider_list']
|
provider_list = test_data['provider_list']
|
||||||
limits = test_data['limits']
|
limits = test_data['limits']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user