Skip to content

Commit 27499f5

Browse files
authored
Add docs about local testing (#63)
* chore: fix tests (beta vs nightly)
1 parent fdb7b90 commit 27499f5

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

README.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,3 +847,30 @@ Gzip support
847847
_db_client = InfluxDBClient(url="http://localhost:9999", token="my-token", org="my-org", enable_gzip=True)
848848
849849
.. marker-gzip-end
850+
851+
Local tests
852+
-----------
853+
854+
.. code-block:: python
855+
856+
# start/restart InfluxDB2 on local machine using docker
857+
./scripts/influxdb-restart.sh
858+
859+
# install requirements
860+
pip install -r requirements.txt --user
861+
pip install -r extra-requirements.txt --user
862+
pip install -r test-requirements.txt --user
863+
864+
# run unit & integration tests
865+
pytest tests
866+
867+
868+
Contributing
869+
------------
870+
871+
Bug reports and pull requests are welcome on GitHub at `https://github.com/influxdata/influxdb-client-python <https://github.com/influxdata/influxdb-client-python>`_.
872+
873+
License
874+
-------
875+
876+
The gem is available as open source under the terms of the `MIT License <https://opensource.org/licenses/MIT>`_.

tests/test_AuthorizationApi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def test_updateAuthorizationStatus(self):
159159
authorization = self.authorization_api().update_authorization(authorization)
160160
self.assertEqual(authorization.status, "active")
161161

162-
@pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/16833")
163162
def test_deleteAuthorization(self):
164163
create_authorization = self.authorization_api().create_authorization(self.organization.id,
165164
self.new_permissions())

tests/test_BucketsApi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_create_delete_bucket(self):
3737
assert self.buckets_api.find_bucket_by_id(my_bucket.id)
3838
assert "bucket not found" in e.value.body
3939

40-
@pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/14900")
4140
def test_find_by_name(self):
4241
my_org = self.find_my_org()
4342

tests/test_TasksApi.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def test_find_task_by_id(self):
159159
task_by_id = self.tasks_api.find_task_by_id(task.id)
160160
self.assertEqual(task, task_by_id)
161161

162-
@pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/13576")
163162
@pytest.mark.skip(reason="https://github.com/influxdata/influxdb/issues/11590")
164163
def test_find_task_by_user_id(self):
165164
task_user = self.users_api.create_user(self.generate_name("TaskUser"))
@@ -377,9 +376,8 @@ def test_cancel_run_not_exist(self):
377376
assert "failed to cancel run" in e.value.body
378377
assert "run not found" in e.value.body
379378

380-
@pytest.mark.skip(reason="uncomment after beta")
381379
def test_cancel_task_not_exist(self):
382380
with pytest.raises(ApiException) as e:
383381
assert self.tasks_api.cancel_run("020f755c3c082000", "020f755c3c082000")
384382
assert "failed to cancel run" in e.value.body
385-
assert "run not found" in e.value.body
383+
assert "task not found" in e.value.body

0 commit comments

Comments
 (0)