Skip to content

Commit

Permalink
Fix test snippet comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leemthompo committed Sep 17, 2024
1 parent e4dccc7 commit df05797
Show file tree
Hide file tree
Showing 36 changed files with 225 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/reference/connector/docs/connectors-API-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ PUT _connector/my-connector-id
"service_type": "postgresql"
}
----
// TEST[skip:TODO]

[TIP]
====
Expand Down Expand Up @@ -246,6 +247,7 @@ POST /_security/api_key
}
}
----
// TEST[skip:TODO]

You'll need to use the `encoded` value from the response as the `elasticsearch.api_key` in your configuration file.

Expand Down Expand Up @@ -307,6 +309,7 @@ The `last_seen` field indicates that the connector successfully connected to {es
----
GET _connector/my-connector-id
----
// TEST[skip:TODO]

[discrete#es-connectors-tutorial-api-update-connector-configuration]
==== Configure connector
Expand Down Expand Up @@ -345,6 +348,7 @@ PUT _connector/my-connector-id/_configuration
}
}
----
// TEST[skip:TODO]

[NOTE]
====
Expand Down Expand Up @@ -374,6 +378,7 @@ POST _connector/_sync_job
"job_type": "full"
}
----
// TEST[skip:TODO]

To store data in {es}, the connector needs to create an index.
When we created the connector, we specified the `music` index.
Expand All @@ -397,6 +402,7 @@ Run the following API call to check the status of the sync job:
----
GET _connector/_sync_job?connector_id=my-connector-id&size=1
----
// TEST[skip:TODO]

The job document will be updated as the sync progresses, you can check it as often as you'd like to poll for updates.

Expand All @@ -408,6 +414,7 @@ Verify that data is present in the `music` index with the following API call:
----
GET music/_count
----
// TEST[skip:TODO]

{es} stores data in documents, which are JSON objects.
List the individual documents with the following API call:
Expand All @@ -416,6 +423,7 @@ List the individual documents with the following API call:
----
GET music/_search
----
// TEST[skip:TODO]

[discrete#es-connectors-tutorial-api-troubleshooting]
=== Troubleshooting
Expand All @@ -426,6 +434,7 @@ Use the following command to inspect the latest sync job's status:
----
GET _connector/_sync_job?connector_id=my-connector-id&size=1
----
// TEST[skip:TODO]

If the connector encountered any errors during the sync, you'll find these in the `error` field.

Expand All @@ -438,6 +447,7 @@ To delete the connector and its associated sync jobs run this command:
----
DELETE _connector/my-connector-id&delete_sync_jobs=true
----
// TEST[skip:TODO]

This won't delete the Elasticsearch index that was created by the connector to store the data.
Delete the `music` index by running the following command:
Expand All @@ -446,6 +456,7 @@ Delete the `music` index by running the following command:
----
DELETE music
----
// TEST[skip:TODO]

To remove the PostgreSQL container, run the following commands:

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/connector/docs/connectors-azure-blob.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@ To perform E2E testing for the Azure Blob Storage connector, run the following c
----
$ make ftest NAME=azure_blob_storage
----
// NOTCONSOLE
For faster tests, add the `DATA_SIZE=small` flag:
[source,shell]
----
make ftest NAME=azure_blob_storage DATA_SIZE=small
----
// NOTCONSOLE
[discrete#es-connectors-azure-blob-client-known-issues]
===== Known issues
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/connector/docs/connectors-box.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,15 @@ To perform E2E testing for the Box connector, run the following command:
----
$ make ftest NAME=box
----
// NOTCONSOLE
For faster tests, add the `DATA_SIZE=small` flag:
[source,shell]
----
make ftest NAME=box DATA_SIZE=small
----
// NOTCONSOLE
[discrete#es-connectors-box-client-known-issues]
===== Known issues
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/connector/docs/connectors-confluence.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
*Example 2*: Queries for indexing data based on `created` and `lastmodified` time.
Expand All @@ -185,6 +186,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
*Example 3*: Query for indexing only given types in a *Space* with key 'SD'.
Expand All @@ -196,6 +198,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand Down Expand Up @@ -432,6 +435,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
*Example 2*: Queries for indexing data based on `created` and `lastmodified` time.
Expand All @@ -446,6 +450,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
*Example 3*: Query for indexing only given types in a *Space* with key 'SD'.
Expand All @@ -457,6 +462,7 @@ Advanced sync rules are defined through a source-specific DSL JSON snippet.
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand Down Expand Up @@ -507,13 +513,15 @@ To perform E2E testing for the Confluence connector, run the following command:
----
$ make ftest NAME=confluence
----
// NOTCONSOLE
For faster tests, add the `DATA_SIZE=small` flag:
[source,shell]
----
make ftest NAME=confluence DATA_SIZE=small
----
// NOTCONSOLE
[discrete#es-connectors-confluence-client-known-issues]
===== Known issues
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/connector/docs/connectors-dropbox.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ An authorization code *can only be used once* to create a refresh token.
----
curl -X POST "https://api.dropboxapi.com/oauth2/token?code=<AUTHORIZATION_CODE>&grant_type=authorization_code" -u "<APP_KEY>:<APP_SECRET>"
----
// NOTCONSOLE
Store the refresh token from the response to be used in the connector configuration.
+
Make sure the response has a list of the following scopes:
Expand Down Expand Up @@ -202,6 +203,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-sync-rules-advanced-example-2]
======= Example: Query with file extension filter
Expand All @@ -220,6 +222,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-sync-rules-advanced-example-3]
======= Example: Query with file category filter
Expand All @@ -242,6 +245,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-sync-rules-advanced-limitations]
======= Limitations
Expand Down Expand Up @@ -344,6 +348,7 @@ An authorization code *can only be used once* to create a refresh token.
----
curl -X POST "https://api.dropboxapi.com/oauth2/token?code=<AUTHORIZATION_CODE>&grant_type=authorization_code" -u "<APP_KEY>:<APP_SECRET>"
----
// NOTCONSOLE
Store the refresh token from the response to be used in the connector configuration.
+
Make sure the response has a list of the following scopes:
Expand Down Expand Up @@ -482,6 +487,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-client-sync-rules-advanced-example-2]
======= Example: Query with file extension filter
Expand All @@ -500,6 +506,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-client-sync-rules-advanced-example-3]
======= Example: Query with file category filter
Expand All @@ -522,6 +529,7 @@ We have some examples below for illustration.
}
]
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-client-sync-rules-advanced-limitations]
======= Limitations
Expand All @@ -540,13 +548,15 @@ To perform E2E testing for the Dropbox connector, run the following command:
----
$ make ftest NAME=dropbox
----
// NOTCONSOLE
For faster tests, add the `DATA_SIZE=small` flag:
[source,shell]
----
make ftest NAME=dropbox DATA_SIZE=small
----
// NOTCONSOLE
[discrete#es-connectors-dropbox-client-known-issues]
===== Known issues
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/connector/docs/connectors-github.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-sync-rules-advanced-issue-key]
======= Indexing document based on issue query related to bugs via issue key
Expand All @@ -238,6 +239,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-sync-rules-advanced-pr-key]
======= Indexing document based on PR query related to open PR's via PR key
Expand All @@ -253,6 +255,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-sync-rules-advanced-issue-query-branch-name]
======= Indexing document and files based on queries and branch name
Expand All @@ -270,6 +273,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand Down Expand Up @@ -298,6 +302,7 @@ Check the Elasticsearch index for the actual document count.
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand Down Expand Up @@ -558,6 +563,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-client-sync-rules-advanced-issue-key]
======= Indexing document based on issue query related to bugs via issue key
Expand All @@ -573,6 +579,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-client-sync-rules-advanced-pr-key]
======= Indexing document based on PR query related to open PR's via PR key
Expand All @@ -588,6 +595,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[discrete#es-connectors-github-client-sync-rules-advanced-issue-query-branch-name]
======= Indexing document and files based on queries and branch name
Expand All @@ -605,6 +613,7 @@ The following sections provide examples of advanced sync rules for this connecto
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand Down Expand Up @@ -633,6 +642,7 @@ Check the Elasticsearch index for the actual document count.
}
]
----
// NOTCONSOLE
[NOTE]
====
Expand All @@ -659,13 +669,15 @@ To perform E2E testing for the GitHub connector, run the following command:
----
$ make ftest NAME=github
----
// NOTCONSOLE
For faster tests, add the `DATA_SIZE=small` flag:
[source,shell]
----
make ftest NAME=github DATA_SIZE=small
----
// NOTCONSOLE
[discrete#es-connectors-github-client-known-issues]
===== Known issues
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/connector/docs/connectors-gmail.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ For example:
]
}
----
// NOTCONSOLE
[discrete#es-connectors-gmail-document-level-security]
===== Document level security
Expand Down Expand Up @@ -324,6 +325,7 @@ For example:
]
}
----
// NOTCONSOLE
[discrete#es-connectors-gmail-client-document-level-security]
===== Document level security
Expand Down
Loading

0 comments on commit df05797

Please sign in to comment.