Browse Source

Remove v1 tests as it's deprecated

Change-Id: Ib82dbda3a3207ac0d5f4137c99453e142eee2be3
Saad Zaher 1 year ago
parent
commit
e1c8ceeb71
1 changed files with 3 additions and 30 deletions
  1. 3
    30
      freezer_tempest_plugin/tests/freezer_api/api/test_api_version.py

+ 3
- 30
freezer_tempest_plugin/tests/freezer_api/api/test_api_version.py View File

@@ -35,15 +35,15 @@ class TestFreezerApiVersion(base.BaseFreezerApiTest):
35 35
 
36 36
         resp_body_json = json.loads(response_body)
37 37
         self.assertIn('versions', resp_body_json)
38
-        current_version = resp_body_json['versions'][1]
38
+        current_version = resp_body_json['versions'][0]
39 39
         self.assertEqual(len(current_version), 4)
40 40
         self.assertIn('id', current_version)
41
-        self.assertEqual(current_version['id'], 'v1')
41
+        self.assertEqual(current_version['id'], 'v2')
42 42
         self.assertIn('links', current_version)
43 43
         links = current_version['links'][0]
44 44
         self.assertIn('href', links)
45 45
         href = links['href']
46
-        self.assertIn('/v1/', href)
46
+        self.assertIn('/v2/', href)
47 47
         self.assertIn('rel', links)
48 48
         rel = links['rel']
49 49
         self.assertEqual('self', rel)
@@ -52,33 +52,6 @@ class TestFreezerApiVersion(base.BaseFreezerApiTest):
52 52
         self.assertEqual('CURRENT', status)
53 53
         self.assertIn('updated', current_version)
54 54
 
55
-    @decorators.attr(type="gate")
56
-    def test_api_version_v1(self):
57
-        resp, response_body = self.freezer_api_client.get_version_v1()
58
-        self.assertEqual(200, resp.status)
59
-
60
-        response_body_jason = json.loads(response_body)
61
-        self.assertIn('resources', response_body_jason)
62
-        resource = response_body_jason['resources']
63
-        self.assertIn('rel/backups', resource)
64
-        rel_backups = resource['rel/backups']
65
-        self.assertIn('href-template', rel_backups)
66
-        href_template = rel_backups['href-template']
67
-        self.assertEqual('/v1/backups/{backup_id}', href_template)
68
-        self.assertIn('href-vars', rel_backups)
69
-        href_vars = rel_backups['href-vars']
70
-        self.assertIn('backup_id', href_vars)
71
-        backup_id = href_vars['backup_id']
72
-        self.assertEqual('param/backup_id', backup_id)
73
-        self.assertIn('hints', rel_backups)
74
-        hints = rel_backups['hints']
75
-        self.assertIn('allow', hints)
76
-        allow = hints['allow']
77
-        self.assertEqual('GET', allow[0])
78
-        self.assertIn('formats', hints)
79
-        formats = hints['formats']
80
-        self.assertIn('application/json', formats)
81
-
82 55
     @decorators.attr(type="gate")
83 56
     def test_api_version_v2(self):
84 57
         resp, response_body = self.freezer_api_client.get_version_v2()

Loading…
Cancel
Save