Skip to content

Commit

Permalink
chore: fix typos (#2940)
Browse files Browse the repository at this point in the history
* docs: typos

* fix: typos
  • Loading branch information
NathanBaulch authored Jan 14, 2025
1 parent 94c563f commit 37ca2b4
Show file tree
Hide file tree
Showing 66 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: go test
# only run tests on linux, there are a number of things that won't allow the tests to run on anything else
# many (maybe, all?) images used can only be build on Linux, they don't have Windows in their manifest, and
# we can't put Windows Server in "Linux Mode" in Github actions
# we can't put Windows Server in "Linux Mode" in GitHub actions
# another, host mode is only available on Linux, and we have tests around that, do we skip them?
if: ${{ inputs.run-tests }}
working-directory: ./${{ inputs.project-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
# We may not need a scope on every commit (i.e. repo-level change).
#
# feat!: read config consistenly
# feat!: read config consistently
# feat(redis): support for clustering
# chore(redis): update tests
# fix(redis): trim connection string
Expand Down
2 changes: 1 addition & 1 deletion cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TerminateContainer(container Container, options ...TerminateOption) error {
return nil
}

// isNil returns true if val is nil or an nil instance false otherwise.
// isNil returns true if val is nil or a nil instance false otherwise.
func isNil(val any) bool {
if val == nil {
return true
Expand Down
2 changes: 1 addition & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type ImageBuildInfo interface {
GetTag() string // get tag label for image
BuildLogWriter() io.Writer // for output of build log, use io.Discard to disable the output
ShouldBuildImage() bool // return true if the image needs to be built
GetBuildArgs() map[string]*string // return the environment args used to build the from Dockerfile
GetBuildArgs() map[string]*string // return the environment args used to build the Dockerfile
GetAuthConfigs() map[string]registry.AuthConfig // Deprecated. Testcontainers will detect registry credentials automatically. Return the auth configs to be able to pull from an authenticated docker registry
}

Expand Down
2 changes: 1 addition & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (c *DockerContainer) CopyDirToContainer(ctx context.Context, hostDirPath st
}

if !dir {
// it's not a dir: let the consumer to handle an error
// it's not a dir: let the consumer handle the error
return fmt.Errorf("path %s is not a directory", hostDirPath)
}

Expand Down
2 changes: 1 addition & 1 deletion docker_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func requireValidAuthConfig(t *testing.T) {
require.NoError(t, err)

// We can only check the keys as the values are not deterministic as they depend
// on users environment.
// on user's environment.
expected := map[string]registry.AuthConfig{
core.IndexDockerIO: {},
exampleRegistry: {},
Expand Down
4 changes: 2 additions & 2 deletions docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ func TestDockerContainerCopyDirToContainer(t *testing.T) {
CleanupContainer(t, nginxC)
require.NoError(t, err)

p := filepath.Join(".", "testdata", "Dokerfile")
p := filepath.Join(".", "testdata", "Dockerfile")
err = nginxC.CopyDirToContainer(ctx, p, "/tmp/testdata/Dockerfile", 700)
require.Error(t, err) // copying a file using the directory method will raise an error

Expand Down Expand Up @@ -1870,7 +1870,7 @@ func assertExtractedFiles(t *testing.T, ctx context.Context, container Container
}

fp := filepath.Join(containerFilePath, srcFile.Name())
// copy file by file, as there is a limitation in the Docker client to copy an entiry directory from the container
// copy file by file, as there is a limitation in the Docker client to copy an entire directory from the container
// paths for the container files are using Linux path separators
fd, err := container.CopyFileFromContainer(ctx, fp)
require.NoError(t, err, "Path not found in container: %s", fp)
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests, or writing code for the core library or for a technology module.

In any case, if you like the project, please star the project on [Github](https://github.com/testcontainers/testcontainers-go/stargazers) and help spread the word :)
In any case, if you like the project, please star the project on [GitHub](https://github.com/testcontainers/testcontainers-go/stargazers) and help spread the word :)
Also join our [Slack workspace](http://slack.testcontainers.org) to get help, share your ideas, and chat with the community.

## Questions
Expand Down Expand Up @@ -49,7 +49,7 @@ Please just be sure to:
* For linting just the modulegen: `make -C modulegen lint`
* verify all tests are passing. Build and test the project with `make test-all` to do this.
* For a given module or example, go to the module or example directory and run `make test`.
* If you find an `ld warning` message on MacOS, you can ignore it. It is a indeed a warning: https://github.com/golang/go/issues/61229
* If you find an `ld warning` message on MacOS, you can ignore it. It is indeed a warning: https://github.com/golang/go/issues/61229
> === Errors
> ld: warning: '/private/var/folders/3y/8hbf585d4yl6f8j5yzqx6wz80000gn/T/go-link-2319589277/000018.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
Expand Down Expand Up @@ -102,4 +102,4 @@ make clean-docs
Note that documentation for pull requests will automatically be published by Netlify as 'deploy previews'.
These deployment previews can be accessed via the `deploy/netlify` check that appears for each pull request.

Please check the Github comment Netlify posts on the PR for the URL to the deployment preview.
Please check the GitHub comment Netlify posts on the PR for the URL to the deployment preview.
2 changes: 1 addition & 1 deletion docs/features/common_functional_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In more locked down / secured environments, it can be problematic to pull images

An image name substitutor converts a Docker image name, as may be specified in code, to an alternative name. This is intended to provide a way to override image names, for example to enforce pulling of images from a private registry.

_Testcontainers for Go_ exposes an interface to perform this operations: `ImageSubstitutor`, and a No-operation implementation to be used as reference for custom implementations:
_Testcontainers for Go_ exposes an interface to perform this operation: `ImageSubstitutor`, and a No-operation implementation to be used as reference for custom implementations:

<!--codeinclude-->
[Image Substitutor Interface](../../options.go) inside_block:imageSubstitutor
Expand Down
4 changes: 2 additions & 2 deletions docs/features/creating_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ In the following example, we are going to create a container using all the lifec
_Testcontainers for Go_ comes with a default logging hook that will print a log message for each container lifecycle event, using the default logger. You can add your own logger by passing the `testcontainers.DefaultLoggingHook` option to the `ContainerRequest`, passing a reference to your preferred logger:

<!--codeinclude-->
[Use a custom logger for container hooks](../../lifecycle_test.go) inside_block:reqWithDefaultLogginHook
[Use a custom logger for container hooks](../../lifecycle_test.go) inside_block:reqWithDefaultLoggingHook
[Custom Logger implementation](../../lifecycle_test.go) inside_block:customLoggerImplementation
<!--/codeinclude-->

Expand All @@ -156,7 +156,7 @@ The aforementioned `GenericContainer` function and the `ContainerRequest` struct
<!--/codeinclude-->

!!!warning
The only special case where the modifiers are not applied last, is when there are no exposed ports in the container request and the container does not use a network mode from a container (e.g. `req.NetworkMode = container.NetworkMode("container:$CONTAINER_ID")`). In that case, _Testcontainers for Go_ will extract the ports from the underliying Docker image and export them.
The only special case where the modifiers are not applied last, is when there are no exposed ports in the container request and the container does not use a network mode from a container (e.g. `req.NetworkMode = container.NetworkMode("container:$CONTAINER_ID")`). In that case, _Testcontainers for Go_ will extract the ports from the underlying Docker image and export them.

## Reusable container

Expand Down
2 changes: 1 addition & 1 deletion docs/features/docker_compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To interact with service containers after a stack was started it is possible to
The function takes a **service name** (and a `context.Context`) and returns either a `*tc.DockerContainer` or an `error`.
This is different to the previous `LocalDockerCompose` API where service containers were accessed via their **container name** e.g. `mysql_1` or `mysql-1` (depending on the version of `docker compose`).

Furthermore, there's the convenience function `Serices()` to get a list of all services **defined** by the current project.
Furthermore, there's the convenience function `Services()` to get a list of all services **defined** by the current project.
Note that not all of them need necessarily be correctly started as the information is based on the given compose files.

### Wait strategies
Expand Down
4 changes: 2 additions & 2 deletions docs/features/follow_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ This will represent the current way for associating `LogConsumer`s. You simply d
[Passing LogConsumers](../../logconsumer_test.go) inside_block:logConsumersAtRequest
<!--/codeinclude-->

Please check that it's possible to configure the log production with an slice of functional options. These options must be of the `LogProductionOption` type:
Please check that it's possible to configure the log production with a slice of functional options. These options must be of the `LogProductionOption` type:

```go
type LogProductionOption func(*DockerContainer)
```

At the moment, _Testcontainers for Go_ exposes an option to set log production timeout, using the `WithLogProductionTimeout` function.

_Testcontainers for Go_ will read this log producer/consumer configuration to automatically start producing logs if an only if the consumers slice contains at least one valid `LogConsumer`.
_Testcontainers for Go_ will read this log producer/consumer configuration to automatically start producing logs if and only if the consumers slice contains at least one valid `LogConsumer`.

## Manually using the FollowOutput function

Expand Down
6 changes: 3 additions & 3 deletions docs/features/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ It is normally advisable to use `Host` and `MappedPort` together when constructi

In some cases it is necessary to make a network connection from a container to a socket that is listening on the host machine. Natively, Docker has limited support for this model across platforms. Testcontainers, however, makes this possible, allowing your code to access services running on the host machine.

In this example, assume that `freePorts` is an slice of ports on our test host machine where different servers (e.g. a web application) are running.
In this example, assume that `freePorts` is a slice of ports on our test host machine where different servers (e.g. a web application) are running.

We can simply create a container and expose these ports to the container using the `ContainerRequest` struct:

Expand All @@ -76,7 +76,7 @@ In the above example we are executing an HTTP request from the command line insi

When you expose a host port to a container, _Testcontainers for Go_ creates an SSHD server companion container, which will be used to forward the traffic from the container to the host machine. This is done by creating a tunnel between the container and the host machine through the SSHD server container.

You can find more information about this SSHD server container on its Github repository: [https://github.com/testcontainers/sshd-docker](https://github.com/testcontainers/sshd-docker).
You can find more information about this SSHD server container on its GitHub repository: [https://github.com/testcontainers/sshd-docker](https://github.com/testcontainers/sshd-docker).

<!--codeinclude-->
[SSHD Server Docker Image](../../port_forwarding.go) inside_block:hubSshdImage
Expand All @@ -101,7 +101,7 @@ In the case you need to skip a test on non-Linux hosts, you can use the `SkipIfD
[Skipping tests on non-Linux hosts](../../docker_test.go) inside_block:skipIfDockerDesktop
<!--/codeinclude-->

It will try to get a Docker client and obtain its Info. In the case the Operation System is "Docker Desktop", it will skip the test.
It will try to get a Docker client and obtain its Info. In the case the Operating System is "Docker Desktop", it will skip the test.

## Advanced networking

Expand Down
2 changes: 1 addition & 1 deletion docs/features/wait/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wait Strategies

There are scenarios where your tests need the external services they rely on to reach a specific state that is particularly useful for testing. This is generally approximated as 'Can we talk to this container over the network?' or 'Let's wait until the container is running an reaches certain state'.
There are scenarios where your tests need the external services they rely on to reach a specific state that is particularly useful for testing. This is generally approximated as 'Can we talk to this container over the network?' or 'Let's wait until the container is running and reaches certain state'.

_Testcontainers for Go_ comes with the concept of `wait strategy`, which allows your tests to actually wait for the most useful conditions to be met, before continuing with their execution. These wait strategies are implemented in the `wait` package.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/azurite.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ go get github.com/testcontainers/testcontainers-go/modules/azurite
## Usage example

<!--codeinclude-->
[Creating a Azurite container](../../modules/azurite/examples_test.go) inside_block:runAzuriteContainer
[Creating an Azurite container](../../modules/azurite/examples_test.go) inside_block:runAzuriteContainer
<!--/codeinclude-->

## Module Reference
Expand All @@ -44,7 +44,7 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
The Azurite container uses the following default credentials:

<!--codeinclude-->
[Default Credencials](../../modules/azurite/azurite.go) inside_block:defaultCredentials
[Default Credentials](../../modules/azurite/azurite.go) inside_block:defaultCredentials
<!--/codeinclude-->

### Container Options
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/cockroachdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Set the database that is created & dialled with `cockroachdb.WithDatabase`.

#### User and Password

You can configured the container to create a user with a password by setting `cockroachdb.WithUser` and `cockroachdb.WithPassword`.
You can configure the container to create a user with a password by setting `cockroachdb.WithUser` and `cockroachdb.WithPassword`.

`cockroachdb.WithPassword` is incompatible with `cockroachdb.WithInsecure`.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/couchbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Once the container is started, it will perform the following operations, **in th
* Configure the Admin user, sending a POST request to the `/settings/web` endpoint in the management port, passing as body of the request the username and password of the admin user.
* Configure the external ports, sending a POST request to the `/node/controller/setupAlternateAddresses/external` endpoint in the management port, passing as body of the request the external mapped ports for each enabled service.
* If the `Index` service is enabled, configure the indexer, sending a POST request to the `/settings/indexes` endpoint in the management port, passing as body of the request the defined storage mode. If the Community Edition is used, it will make sure the storage mode is `forestdb`. If the Enterprise Edition is used, it will make sure the storage mode is not `forestdb`, changing to `memory_optimized` in that case.
* Finally, it will wait for all nodes to be healthy. Depending of the enabled services, it will use a different wait strategy to check if the node is healthy:
* Finally, it will wait for all nodes to be healthy. Depending on the enabled services, it will use a different wait strategy to check if the node is healthy:
- It will wait for the `/pools/default` endpoint in the management port to return a 200 HTTP status code and the response body to contain the `healthy` key set to `true`.
- If the `Query` service is enabled, it will wait for the `/admin/ping` endpoint in the query port to return a 200 HTTP status code.
- If the `Analytics` service is enabled, it will wait for the `/admin/ping` endpoint in the analytics port to return a 200 HTTP status code.
Expand Down Expand Up @@ -93,7 +93,7 @@ When the password has less than 6 characters, the container won't be created and
#### Buckets
When creating a new Couchbase container, you can create one or more buckets. The module exposes a `WithBuckets` optional function that accepts an slice of buckets to be created.
When creating a new Couchbase container, you can create one or more buckets. The module exposes a `WithBuckets` optional function that accepts a slice of buckets to be created.
To create a new bucket, the module also exposes a `NewBucket` function, where you can pass the bucket name.
It's possible to customize a newly created bucket, using the following options:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ go get github.com/testcontainers/testcontainers-go/modules/elasticsearch
## Usage example

<!--codeinclude-->
[Creating a Elasticsearch container](../../modules/elasticsearch/examples_test.go) inside_block:runElasticsearchContainer
[Creating an Elasticsearch container](../../modules/elasticsearch/examples_test.go) inside_block:runElasticsearchContainer
<!--/codeinclude-->

## Module Reference
Expand Down
Loading

0 comments on commit 37ca2b4

Please sign in to comment.