You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPER_GUIDE.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,8 @@ For faster local iterations, skip integration tests. ``./gradlew build -x integT
261
261
262
262
For integration test, you can use ``-Dtests.class`` "UT full path" to run a task individually. For example ``./gradlew :integ-test:integTest -Dtests.class="*QueryIT"``.
263
263
264
+
If Prometheus isn't available in your environment, you can skip downloading and starting it by adding ``-DignorePrometheus`` (or setting it to any value other than ``false``) to the command. For example ``./gradlew :integ-test:integTest -DignorePrometheus`` bypasses Prometheus setup and excludes Prometheus-specific integration tests, and ``./gradlew :doctest:doctest -DignorePrometheus`` skips the Prometheus-dependent doctest cases.
265
+
264
266
To run the task above for specific module, you can do ``./gradlew :<module_name>:task``. For example, only build core module by ``./gradlew :core:build``.
Copy file name to clipboardExpand all lines: docs/dev/testing-doctest.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,15 +52,15 @@ For actually testing the code, the goal is to thoroughly test every case, rather
52
52
53
53
## 1.4 How to use doctest?
54
54
### 1.4.2 How to run existing doctest?
55
-
Doctest runs with project build by `./gradlew build`. You can also only run doctest by `./gradlew doctest`
55
+
Doctest runs with project build by `./gradlew build`. You can also only run doctest by `./gradlew doctest`. If a Prometheus instance isn't available locally, add `-DignorePrometheus` (or set the property to any value other than `false`) to skip Prometheus setup and the Prometheus-specific doctest scenarios.
56
56
57
57
Make sure you don't have any OpenSearch instance running at `http://localhost:9200`
58
58
59
59
### 1.4.2 How to write documentation with doctest?
60
60
1. If you want to add a new doc, you can add it to `docs` folder, under correct sub-folder, in `.rst` format.
61
61
> **Attention**: For code examples in documentation, a Mixing usage of `cli` and `bash` in one doc is not supported yet.
62
62
2. Add your new doc file path to `docs/category.json` by its category
63
-
3. Run doctest `./gradlew doctest` to see if your tests can pass
63
+
3. Run doctest `./gradlew doctest`(optionally with `-DignorePrometheus`) to see if your tests can pass
64
64
65
65
Currently, there is a `sample` folder under `docs` module to help you get started.
After a Prometheus datasource is configured, you can inspect the schema of any metric by running the ``describe`` command against the fully qualified table name. For example::
0 commit comments