summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-09-12 19:01:14 -0400
committerKevin Song <chipbuster@users.noreply.github.com>2019-09-12 18:01:13 -0500
commit3e23a9a73cc5671aee4338dba1203f5864a42dd4 (patch)
treebbc3a7234c6d6f600a717f53d390f2d2c01f6a5d
parent373493be85f9bace92dd03e5595e43ad5dc59c9b (diff)
chore: Rename integration_test to acceptance_test (#356)
-rw-r--r--CONTRIBUTING.md6
-rwxr-xr-xacceptance_test (renamed from integration_test)2
-rw-r--r--src/modules/time.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1a92fd36d..bdb8abd16 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -62,7 +62,7 @@ cargo fmt
Testing is critical to making sure starship works as intended on systems big and small. Starship interfaces with many applications and system APIs when generating the prompt, so there's a lot of room for bugs to slip in.
Unit tests and a subset of acceptance tests can be run with `cargo test`.
-The full acceptance test suite can be run in a Docker container with the included [`./integration_test`](integration_test) script.
+The full acceptance test suite can be run in a Docker container with the included [`./acceptance_test`](acceptance_test) script.
### Unit Testing
@@ -76,9 +76,9 @@ The previous point should be emphasized: even seemingly innocuous ideas like "if
Acceptance tests are located in the [`tests/`](tests) directory and are also written using the built-in Rust testing library.
-Acceptance tests should test full modules or the entire prompt. All integration tests expecting the testing environment to have preexisting state or making permanent changes to the filesystem should have the `#[ignore]` attribute. All tests that don't depend on any preexisting state will be run alongside the unit tests with `cargo test`.
+Acceptance tests should test full modules or the entire prompt. All acceptance tests expecting the testing environment to have preexisting state or making permanent changes to the filesystem should have the `#[ignore]` attribute. All tests that don't depend on any preexisting state will be run alongside the unit tests with `cargo test`.
-Acceptance tests require Docker to be installed, as they are run inside a Docker container. This can be done as described in the official [documentation](https://docs.docker.com/install/). The acceptance tests can then be executed by running the included [`./integration_test`](integration_test) script. It might be necessary to run [`./integration_test`](integration_test) with `sudo` if your user is not part of the `docker` group.
+Acceptance tests require Docker to be installed, as they are run inside a Docker container. This can be done as described in the official [documentation](https://docs.docker.com/install/). The acceptance tests can then be executed by running the included [`./acceptance_test`](acceptance_test) script. It might be necessary to run [`./acceptance_test`](acceptance_test) with `sudo` if your user is not part of the `docker` group.
For tests that depend on having preexisting state, whatever needed state will have to be added to the project's Dockerfile ([`tests/Dockerfile`](tests/Dockerfile)) as well as the project's Azure Pipelines configuration ([`azure-pipelines.yml`](azure-pipelines.yml)).
diff --git a/integration_test b/acceptance_test
index a6b7518ba..ff9a6262f 100755
--- a/integration_test
+++ b/acceptance_test
@@ -1,7 +1,7 @@
#!/bin/bash
if ! (docker --version); then
- printf 'Docker is required to run the starship integration tests.\n'
+ printf 'Docker is required to run the starship acceptance tests.\n'
printf 'Please download and install Docker in order to run these tests locally.\n'
exit 1
fi
diff --git a/src/modules/time.rs b/src/modules/time.rs
index bf1857c4f..0450e86fe 100644
--- a/src/modules/time.rs
+++ b/src/modules/time.rs
@@ -45,7 +45,7 @@ fn format_time(time_format: &str, localtime: DateTime<Local>) -> String {
localtime.format(time_format).to_string()
}
-/* Because we cannot do integration tests on the time module, these unit
+/* Because we cannot make acceptance tests for the time module, these unit
tests become extra important */
#[cfg(test)]
mod tests {