From 72509f9b8455c5fa9e66e9898eede630bbfbab2c Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 28 Feb 2020 07:42:12 +0100 Subject: [PATCH 1/3] docs: add info how to start tests and Contributing, License --- README.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.rst b/README.rst index 264bfe21..3dcbdd22 100644 --- a/README.rst +++ b/README.rst @@ -847,3 +847,30 @@ Gzip support _db_client = InfluxDBClient(url="http://localhost:9999", token="my-token", org="my-org", enable_gzip=True) .. marker-gzip-end + +Local tests +----------- + +.. code-block:: python + + # start/restart InfluxDB2 on local machine using docker + ./scripts/influxdb-restart.sh + + # install requirements + pip install -r requirements.txt --user + pip install -r extra-requirements.txt --user + pip install -r test-requirements.txt --user + + # run unit & integration tests + pytest tests + + +Contributing +------------ + +Bug reports and pull requests are welcome on GitHub at `https://github.com/influxdata/influxdb-client-python `_. + +License +------- + +The gem is available as open source under the terms of the `MIT License `_. \ No newline at end of file From d223883cafc929cdaa911b4901514ff62a082343 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 28 Feb 2020 07:42:52 +0100 Subject: [PATCH 2/3] chore: fix tests (beta vs nightly) --- tests/test_TasksApi.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_TasksApi.py b/tests/test_TasksApi.py index f16d892e..da0bb31a 100644 --- a/tests/test_TasksApi.py +++ b/tests/test_TasksApi.py @@ -377,7 +377,6 @@ def test_cancel_run_not_exist(self): assert "failed to cancel run" in e.value.body assert "run not found" in e.value.body - @pytest.mark.skip(reason="uncomment after beta") def test_cancel_task_not_exist(self): with pytest.raises(ApiException) as e: assert self.tasks_api.cancel_run("020f755c3c082000", "020f755c3c082000") From f6476bef92c4e7e045c9bab7d89842f313d7efc3 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 28 Feb 2020 07:53:14 +0100 Subject: [PATCH 3/3] chore: fix tests (beta vs nightly) --- tests/test_AuthorizationApi.py | 1 - tests/test_BucketsApi.py | 1 - tests/test_TasksApi.py | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_AuthorizationApi.py b/tests/test_AuthorizationApi.py index c23120d6..53ceb845 100644 --- a/tests/test_AuthorizationApi.py +++ b/tests/test_AuthorizationApi.py @@ -159,7 +159,6 @@ def test_updateAuthorizationStatus(self): authorization = self.authorization_api().update_authorization(authorization) self.assertEqual(authorization.status, "active") - @pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/16833") def test_deleteAuthorization(self): create_authorization = self.authorization_api().create_authorization(self.organization.id, self.new_permissions()) diff --git a/tests/test_BucketsApi.py b/tests/test_BucketsApi.py index 876e5e67..a528bf03 100644 --- a/tests/test_BucketsApi.py +++ b/tests/test_BucketsApi.py @@ -37,7 +37,6 @@ def test_create_delete_bucket(self): assert self.buckets_api.find_bucket_by_id(my_bucket.id) assert "bucket not found" in e.value.body - @pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/14900") def test_find_by_name(self): my_org = self.find_my_org() diff --git a/tests/test_TasksApi.py b/tests/test_TasksApi.py index da0bb31a..d6cc58c9 100644 --- a/tests/test_TasksApi.py +++ b/tests/test_TasksApi.py @@ -159,7 +159,6 @@ def test_find_task_by_id(self): task_by_id = self.tasks_api.find_task_by_id(task.id) self.assertEqual(task, task_by_id) - @pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/13576") @pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/11590") def test_find_task_by_user_id(self): task_user = self.users_api.create_user(self.generate_name("TaskUser")) @@ -381,4 +380,4 @@ def test_cancel_task_not_exist(self): with pytest.raises(ApiException) as e: assert self.tasks_api.cancel_run("020f755c3c082000", "020f755c3c082000") assert "failed to cancel run" in e.value.body - assert "run not found" in e.value.body + assert "task not found" in e.value.body