You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by al...@apache.org on 2020/08/22 11:33:02 UTC
[skywalking-python] 03/03: update test
This is an automated email from the ASF dual-hosted git repository.
alonelaval pushed a commit to branch process-propagation
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git
commit 622fc845b6eed50bb47cba762e6d57c7923ec03d
Author: huawei <hu...@bit-s.cn>
AuthorDate: Sat Aug 22 19:30:44 2020 +0800
update test
---
tests/plugin/sw_process/test_process.py | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/tests/plugin/sw_process/test_process.py b/tests/plugin/sw_process/test_process.py
index ea88508..12417b3 100644
--- a/tests/plugin/sw_process/test_process.py
+++ b/tests/plugin/sw_process/test_process.py
@@ -14,29 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-import inspect
-import time
-import unittest
-from os.path import dirname
+from typing import Callable
+import pytest
import requests
-from testcontainers.compose import DockerCompose
+from tests.plugin.base import TestPluginBase
-from tests.plugin import BasePluginTest
+@pytest.fixture
+def prepare():
+ # type: () -> Callable
+ return lambda *_: requests.get('http://0.0.0.0:9090/users')
-class TestPlugin(BasePluginTest):
- @classmethod
- def setUpClass(cls):
- cls.compose = DockerCompose(filepath=dirname(inspect.getfile(cls)))
- cls.compose.start()
- cls.compose.wait_for(cls.url(('consumer', '9090'), 'users'))
-
- def test_plugin(self):
- time.sleep(10)
+class TestPlugin(TestPluginBase):
+ @pytest.mark.parametrize('version', [
+ 'flask==1.1.2',
+ ])
+ def test_plugin(self, docker_compose, version):
self.validate()
-
-
-if __name__ == '__main__':
- unittest.main()