Skip to content

Comments

Port 3286 - Add ability to control which Elixir integration tests to run#3752

Merged
iilyak merged 8 commits intoapache:3.xfrom
cloudant:port-3286
Sep 17, 2021
Merged

Port 3286 - Add ability to control which Elixir integration tests to run#3752
iilyak merged 8 commits intoapache:3.xfrom
cloudant:port-3286

Conversation

@iilyak
Copy link
Contributor

@iilyak iilyak commented Sep 15, 2021

Overview

The main purpose of this PR is to port #3286 to 3.x. Which adds ability to run elixir suite against already running instance of CouchDB. However due to various changes to underlying build infrastructure few other commits and PRs were added into the mix.

There were couple of fixups to make test suite pass

  • 3.x uses Code.require_file to inject partition_helpers.exs and reshard_helpers.exs. The original implementation of Couch.Test.Suite in #3286 didn't support test helpers.
  • I found a bug in state management of ensure_exunit_started() function. We used Process.gett/2 instead of Process.put/2 (see ensure_exunit_started()).
  • few elixir tests were added to main without updating test/elixir/test/config/suite.elixir

Testing recommendations

1 Make sure that tests discovery works

MIX_ENV=integration mix build
MIX_ENV=integration mix suite

2 Make sure the tests run and pass by using make elixir-suite

Related Issues or Pull Requests

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation

@iilyak iilyak changed the title Port 3286 Port 3286 - Add ability to control which Elixir integration tests to run Sep 15, 2021
@iilyak iilyak force-pushed the port-3286 branch 2 times, most recently from 9516c7c to 5e03244 Compare September 16, 2021 11:19
iilyak and others added 8 commits September 16, 2021 04:20
New `elixir-suite` Makefile target is added. It runs a predefined set of elixir
integration tests.

The feature is controlled by two files:
- test/elixir/test/config/suite.elixir - contains list of all available tests
- test/elixir/test/config/skip.elixir - contains list of tests to skip

In order to update the `test/elixir/test/config/suite.elixir` when new tests
are added. The one would need to run the following command:

```
MIX_ENV=integration mix suite > test/elixir/test/config/suite.elixir
```
@iilyak iilyak merged commit 2871128 into apache:3.x Sep 17, 2021
@iilyak iilyak deleted the port-3286 branch September 17, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants