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:
amitgandhinz 2014-11-20 17:06:49 -05:00
parent dbd6e05fc7
commit 173fe7686b
2 changed files with 13 additions and 9 deletions

View File

@ -45,20 +45,14 @@
"provider_list": [
{"provider": "fastly",
"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": {
"skip_test": true,
"limits": [],
"provider_list": [
{"provider": "fastly",
"links": [{"href": "watermelon", "rel": "provider_url"}]}]},
"missing_limits_origins": {
"skip_test": true,
"limits": [
{"domains": {"min": 1, "max": 5}},
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
@ -66,6 +60,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"missing_limits_domains": {
"skip_test": true,
"limits": [
{"domains": {"min": 1, "max": 5}},
{"caching": {"min": 3600, "max": 604800, "incr": 300}}],
@ -73,6 +68,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"missing_limits_caching": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": 5}},
{"domains": {"min": 1, "max": 5}}],
@ -80,6 +76,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"empty_limits_origins": {
"skip_test": true,
"limits": [
{"origins": {}},
{"domains": {"min": 1, "max": 5}},
@ -88,6 +85,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"empty_limits_domains": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": 5}},
{"domains": {}},
@ -96,6 +94,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"empty_limits_caching": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": 5}},
{"domains": {"min": 1, "max": 5}},
@ -104,6 +103,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"invalid_limits_origins": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": -5}},
{"domains": {"min": 1, "max": 5}},
@ -112,6 +112,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"invalid_limits_domains": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": 5}},
{"domains": {"min": 100000000000000000000000000000000000000, "max": 5}},
@ -120,6 +121,7 @@
{"provider": "fastly",
"links": [{"href": "www.watermelon.com", "rel": "provider_url"}]}]},
"invalid_limits_caching": {
"skip_test": true,
"limits": [
{"origins": {"min": 1, "max": 5}},
{"domains": {"min": 1, "max": 5}},

View File

@ -57,7 +57,9 @@ class TestCreateFlavors(base.TestBase):
@ddt.file_data('data_create_flavor_negative.json')
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']
limits = test_data['limits']