Browse Source

Fix the nsxt_uninstall test

Change-Id: I2f54afe099f879e40180b1b8740d60e2f664fd46
ibumarskov 2 years ago
parent
commit
9f5108f83a
2 changed files with 9 additions and 16 deletions
  1. 0
    6
      plugin_test/tests/base_plugin_test.py
  2. 9
    10
      plugin_test/tests/test_plugin_nsxt.py

+ 0
- 6
plugin_test/tests/base_plugin_test.py View File

@@ -90,9 +90,3 @@ class TestNSXtBase(TestBasic):
90 90
             expected=[1 if failover else 0],
91 91
             raise_on_err=not failover
92 92
         )
93
-
94
-        output = self.ssh_manager.check_call(
95
-            ip=self.ssh_manager.admin_ip,
96
-            command='fuel2 plugins list -f value -c name'
97
-        ).stdout[-1].split(' ')
98
-        assert_true(plugin_name in output != failover, msg)

+ 9
- 10
plugin_test/tests/test_plugin_nsxt.py View File

@@ -71,9 +71,8 @@ class TestNSXtSmoke(TestNSXtBase):
71 71
 
72 72
         Scenario:
73 73
             1. Revert to snapshot nsxt_install
74
-            2. Remove NSX-T plugin.
75
-            3. Run command 'fuel plugins' to ensure the NSX-T plugin has
76
-               been removed.
74
+            2. Remove NSX-T plugin
75
+            3. Verify that plugin is removed.
77 76
 
78 77
         Duration: 5 min
79 78
         """
@@ -81,16 +80,16 @@ class TestNSXtSmoke(TestNSXtBase):
81 80
         self.env.revert_snapshot("nsxt_install")
82 81
 
83 82
         self.show_step(2)
84
-        cmd = 'fuel plugins --remove {0}=={1}'.format(
85
-            self.default.PLUGIN_NAME, self.default.NSXT_PLUGIN_VERSION)
83
+        self.delete_nsxt_plugin()
86 84
 
87
-        self.ssh_manager.execute_on_remote(
85
+        self.show_step(3)
86
+        plugin_name = self.default.PLUGIN_NAME
87
+        output = self.ssh_manager.execute_on_remote(
88 88
             ip=self.ssh_manager.admin_ip,
89
-            cmd=cmd,
90
-            err_msg='Can not remove plugin.')
89
+            cmd='fuel plugins list')['stdout'].pop().split(' ')
91 90
 
92
-        self.show_step(3)
93
-        self.delete_nsxt_plugin()
91
+        assert_true(plugin_name not in output,
92
+                    "Plugin '{0}' is not removed".format(plugin_name))
94 93
 
95 94
     @test(depends_on=[nsxt_install],
96 95
           groups=["nsxt_smoke"])

Loading…
Cancel
Save