Skip to content

Commit

Permalink
Document the replaceUsernames setting in .drone.star
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Feb 1, 2021
1 parent 83e235b commit fea1143
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions modules/developer_manual/pages/testing/acceptance-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,35 @@ and specify the values to be used at run time. For example:
}
----

Then define the environment variable `REPLACE_USERNAMES` to be true:
If you are running tests locally, define the environment variable `REPLACE_USERNAMES` to be true:

[source,bash]
----
export REPLACE_USERNAMES=true
----

When you run acceptance tests, the user names and attributes will be replaced.
You can also run the acceptance tests in CI with the replaced user attributes. This is useful if you want to
run many acceptance tests with an unusual combination of usernames, display names, email addresses and
passwords without taking up many hours on a local machine. _A PR is necessary for testing but is not to be merged_,
it is just a way to get test results. In the `acceptance` section of `.drone.star` switch on the `replaceUsernames` setting.
Commit the changes to `.drone.star` and `tests/acceptance/usernames.json`, push to GitHub, and make a draft PR:

[source,bash]
----
'acceptance': {
'api': {
'suites': [
'apiAuth',
'apiAuthOcs',
'apiAuthWebDav',
# and so on...
],
'replaceUsernames': True,
},
},
----

When the acceptance tests are run, the user names and attributes will be replaced.

=== Displaying the ownCloud Log

Expand Down

0 comments on commit fea1143

Please sign in to comment.