Skip to content

Add test execution guide in yamlRestTest asciidoc#88490

Merged
mark-vieira merged 3 commits intoelastic:masterfrom
chen-ni:issue-88406
Jul 14, 2022
Merged

Add test execution guide in yamlRestTest asciidoc#88490
mark-vieira merged 3 commits intoelastic:masterfrom
chen-ni:issue-88406

Conversation

@chen-ni
Copy link
Copy Markdown
Contributor

@chen-ni chen-ni commented Jul 12, 2022

Fix #88406

@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v8.4.0 labels Jul 12, 2022
@stu-elastic stu-elastic added >docs General docs changes :Delivery/Build Build or test infrastructure labels Jul 13, 2022
@elasticmachine elasticmachine added Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team labels Jul 13, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Copy Markdown
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion, otherwise 👍.

@mark-vieira
Copy link
Copy Markdown
Contributor

@elasticmachine ok to test

@mark-vieira mark-vieira self-assigned this Jul 13, 2022
@mark-vieira
Copy link
Copy Markdown
Contributor

@elasticmachine run elasticsearch-ci/part-2

Co-authored-by: Mark Vieira <portugee@gmail.com>
@chen-ni
Copy link
Copy Markdown
Contributor Author

chen-ni commented Jul 14, 2022

@mark-vieira Unfortunately, the suggested code doesn't seem to work. The following syntax is not recognized as a link both in IntelliJ and on GitHub:

/TESTING.asciidoc#testing-the-rest-layer[this section]

I then tried converting it into an xref:

xref:/TESTING.asciidoc#_testing_the_rest_layer[this section]

where #_testing_the_rest_layer is the auto-generated asciidoc ID for the section. But this doesn't work either, apparently because xref doesn't support referring document from root directory (/).

Now I'm stuck. I referred to the official guide and this SO question but they don't help much.

@chen-ni
Copy link
Copy Markdown
Contributor Author

chen-ni commented Jul 14, 2022

Just submitted asciidoctor/asciidoctor#4313 to ask about it.

@chen-ni
Copy link
Copy Markdown
Contributor Author

chen-ni commented Jul 14, 2022

@mark-vieira xref works now on GitHub after turning compat-mode off by adding :!compat-mode:. (It still doesn't work in IntelliJ, but I think it doesn't matter.)

You can verify it here: https://github.com/chen-ni/elasticsearch/blob/issue-88406/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/README.asciidoc

Could you please review again, thanks :)

@mark-vieira
Copy link
Copy Markdown
Contributor

Thanks @chen-ni!

@mark-vieira mark-vieira merged commit c45c205 into elastic:master Jul 14, 2022
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Jul 15, 2022
* upstream/master: (2974 commits)
  Reserved cluster state service (elastic#88527)
  Add transport action immutable state checks (elastic#88491)
  Remove suggest flag from index stats docs (elastic#85479)
  Polling cluster formation state for master-is-stable health indicator (elastic#88397)
  Add test execution guide in yamlRestTest asciidoc (elastic#88490)
  Add troubleshooting guide for corrupt repository (elastic#88391)
  [Transform] Finetune Schedule to be less noisy on retry and retry slower (elastic#88531)
  Updatable API keys - auto-update legacy RDs (elastic#88514)
  Fix typo in TransportForceMergeAction and TransportClearIndicesCacheA… (elastic#88064)
  Fixed NullPointerException on bulk request (elastic#88358)
  Avoid needless index metadata builders during reroute (elastic#88506)
  Set metadata on request in API key noop test (elastic#88507)
  Fix passing positional args to ES in Docker (elastic#88502)
  Improve description for task api detailed param (elastic#88493)
  Support cartesian shape with doc values (elastic#88487)
  Promote usage of Subjects in Authentication class (elastic#88494)
  Add CCx 2.0 feature flag (elastic#88451)
  Reword the watcher 'always' and 'never' condition docs (elastic#86105)
  Simplify azure discovery installation docs (elastic#88404)
  Breakup FIPS CI testing jobs
  ...

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java
#	x-pack/plugin/mapper-aggregate-metric/src/main/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateDoubleMetricFieldMapper.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure >docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team v8.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need explanation of how to run tests in rest-api-spec test guide

5 participants