instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
testcontainers__testcontainers-go__2955 | testcontainers/testcontainers-go | 2,955 | defect | a43edc83e7ebaa8b756bc3550d79eb30f7784af2 | bb4e464400ac15c07cee0805dac690a5ac718ee6 | feat: adds Pinecone module | - **chore: bootstrap Pinecone module**
- **chore: use pinecone client in tests**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
It ports the Java implementation to Go.
<!-- Mandatory
Explain here the changes you made on the... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1538b1e645..c7a6c2be2d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -94,7 +94,7 @@ jobs:
matrix:
go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
- module: [artemis, azurite, cassandra, c... | 2 | 2 | 1 | [{"id": "G0", "claim": "The pull request must not downgrade the sonarcloud CI actions — restore actions/download-artifact to the pinned v4.1.8 (fa0a91b85d4f404e444e00e005971372dc801d16) and sonarsource/sonarcloud-github-action to v4.0.0 (02ef91109b2d589e757aefcfb2854c2783fd7b19) instead of the older versions it switche... | null |
testcontainers__testcontainers-go__2988 | testcontainers/testcontainers-go | 2,988 | defect | f09b3af2cb985a17bd2b2eaaa5d384882ded8e28 | 8f0cbe4e80ce8ab1ea56fd0e3a9c9612d244354e | feat(mssql): add WithInitSQL function | ## What does this PR do?
Add `WithInitSQL` function to facilitate any initial e.g. DDL scripts to be processed before testing against the container.
## Why is it important?
It will improve developer experience and follow the same conventions that exist for other modules, e.g. `mysql`.
## How to test this PR
R... | diff --git a/modules/mssql/mssql.go b/modules/mssql/mssql.go
index 17337bf85b9..b7ab5f69239 100644
--- a/modules/mssql/mssql.go
+++ b/modules/mssql/mssql.go
@@ -3,6 +3,8 @@ package mssql
import (
"context"
"fmt"
+ "path/filepath"
+ "strconv"
"strings"
"github.com/testcontainers/testcontainers-go"
@@ -41,6 +4... | 12 | 11 | 4 | [{"id": "G0", "claim": "Reading MSSQL_SA_PASSWORD eagerly in WithScripts can capture the default password when the option is applied before WithPassword, so the password lookup should be moved inside each container hook and tests should pass the options in both orders.", "category": "correctness", "verdict": "supported... | null |
testcontainers__testcontainers-go__3004 | testcontainers/testcontainers-go | 3,004 | defect | 33d5a8790aa93c82f9fe65a50d98bc275f63872e | 1cb2c884d77b078263538549208d50c5fb0ac589 | feat(modules): add dind module | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This PR closes #3003 which adds a Docker in Docker module (dind) to easily have access to a DinD container.
<!-- Mandatory
Explain here the changes you made on the PR.... | diff --git a/.vscode/.testcontainers-go.code-workspace b/.vscode/.testcontainers-go.code-workspace
index f21ac79be4b..bb9945f7f2c 100644
--- a/.vscode/.testcontainers-go.code-workspace
+++ b/.vscode/.testcontainers-go.code-workspace
@@ -53,6 +53,10 @@
"name": "module / databend",
"path": "../m... | 25 | 23 | 5 | [{"id": "G0", "claim": "The module could provide a method returning a Docker client built with testcontainers.NewDockerClientWithOpts so consumers use the same client infrastructure.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Remove the generated cover... | null |
testcontainers__testcontainers-go__3032 | testcontainers/testcontainers-go | 3,032 | defect | e3611baa3b7ff13ffb707a212b35c346f1912561 | 8d9cdc4782795ecc87935c0f9ccec38ac7c9a0a8 | fix: skip nil strategies in wait.ForAll | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This PR skips nil wait strategies in case some downstream consumer uses the wait.ForAll without checking the validity of all the straegies in the list.
A clear example is buildi... | diff --git a/wait/all.go b/wait/all.go
index fb7eb4e5f3..d372d87c80 100644
--- a/wait/all.go
+++ b/wait/all.go
@@ -62,6 +62,13 @@ func (ms *MultiStrategy) WaitUntilReady(ctx context.Context, target StrategyTarg
}
for _, strategy := range ms.Strategies {
+ if strategy == nil {
+ // A module could be appending s... | 1 | 1 | 1 | [{"id": "G0", "claim": "The nil check `strategy == nil` will not detect a nil value of a concrete type that implements Strategy (a typed-nil interface), so such a strategy is not skipped.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testcontainers__testcontainers-go__3044 | testcontainers/testcontainers-go | 3,044 | defect | 62e7068d753641bb5f38cf79daf01d5dc31f122a | f9cded38dfb4d25b66db46c30abb3f8b5e30f86d | feat: support for mounting images | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This PR updates the code for mounting images, creating a new mount type for Images, and adding the types and methods needed to implement it.
A new optional Validator inte... | diff --git a/docker_mounts.go b/docker_mounts.go
index 7954b2b102..88b28d60b5 100644
--- a/docker_mounts.go
+++ b/docker_mounts.go
@@ -1,6 +1,9 @@
package testcontainers
import (
+ "errors"
+ "path/filepath"
+
"github.com/docker/docker/api/types/mount"
"github.com/testcontainers/testcontainers-go/log"
@@ -11,... | 4 | 3 | 1 | [{"id": "G0", "claim": "DockerImageMountSource should be named more simply (e.g. ImageMountSource) and the image-mount abstraction simplified instead of following the existing Docker-prefixed naming pattern.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "V... | null |
testcontainers__testcontainers-go__3048 | testcontainers/testcontainers-go | 3,048 | defect | 4a668c6053cc132cb8f70e832488f2e8ca0a7dbe | 90603ed0f328f58598a52d8d6b35097f4497d009 | feat(couchbase): adding auth to couchbase initCluster functions to support container reuse | ## What does this PR do?
This PR aims to enable a created couchbase container to be reused between test packages, and accomplishes this by passing the basic auth header with every request made to the container's management ports.
## Why is it important?
Since Go's test context creates physically separated binaries... | diff --git a/modules/couchbase/couchbase.go b/modules/couchbase/couchbase.go
index c6f7b8d53b..2bbaa08dd8 100644
--- a/modules/couchbase/couchbase.go
+++ b/modules/couchbase/couchbase.go
@@ -218,11 +218,12 @@ func (c *CouchbaseContainer) waitUntilNodeIsOnline(ctx context.Context) error {
WithStatusCodeMatcher(func(s... | 3 | 1 | 0 | [{"id": "G0", "claim": "The cluster configuration should be skipped when container reuse is enabled, as Testcontainers for Java did when it fixed a similar issue (testcontainers-java#9957).", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test's hand-r... | null |
testcontainers__testcontainers-go__3062 | testcontainers/testcontainers-go | 3,062 | defect | 3298e9a4d9c48615715f892e8e6e5505384270aa | b3305a6c495e029eecbe4bd1d390931adb24e6a0 | fix: handle stopped containers more gracefully when reuse is enabled | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
Fixes a bug that causes testcontainers to hang for a really long time waiting on a stopped container when reuse is enabled.
The fix in short is:
When a container is ... | diff --git a/docker.go b/docker.go
index 774a364e02..33c1d1d438 100644
--- a/docker.go
+++ b/docker.go
@@ -1271,7 +1271,7 @@ func (p *DockerProvider) findContainerByName(ctx context.Context, name string) (
// Note that, 'name' filter will use regex to find the containers
filter := filters.NewArgs(filters.Arg("nam... | 3 | 3 | 3 | [{"id": "G0", "claim": "Bug: dc.IsRunning always returns false for the container struct initialised right above, so the RyukDisabled guard never starts the stopped container; use c.State == \"running\" instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "... | null |
testcontainers__testcontainers-go__3071 | testcontainers/testcontainers-go | 3,071 | defect | 81ec5f4c291686959bbcbe4e2990d7865eac425d | fc13d977e173642b394cfe69a9eb61bcfd09ae09 | feat: add socat container | - **chore: create socat module from modulegen**
- **chore: implement socat**
- **chore: bump tc-go**
- **chore: mod tidy**
- **chore: fix examples**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
It adds a SOCAT c... | diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 0f621c1cb1..e7752965e2 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -63,6 +63,7 @@ updates:
- /modules/redpanda
- /modules/registry
- /modules/scylladb
+ - /modules/socat
- /modules/surre... | 6 | 5 | 0 | [{"id": "G0", "claim": "Make the exported Targets field of the options struct private so the API can be adjusted in the future.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider replacing the variadic WithTargets option with separate per-target opt... | null |
testcontainers__testcontainers-go__3072 | testcontainers/testcontainers-go | 3,072 | defect | 81ec5f4c291686959bbcbe4e2990d7865eac425d | 12441ad17020f1a73c224284a9dc818f43ed1b6c | feat(influxdb): support for influxdbv2 | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
Feature
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
I... | diff --git a/docs/modules/influxdb.md b/docs/modules/influxdb.md
index 2243f40dab8..a4cee31c75d 100644
--- a/docs/modules/influxdb.md
+++ b/docs/modules/influxdb.md
@@ -4,7 +4,7 @@ Since testcontainers-go <a href="https://github.com/testcontainers/testcontainer
## Introduction
-A testcontainers module for InfluxDB... | 14 | 11 | 4 | [{"id": "G0", "claim": "The exported type InfluxDBV2Config and the exported function WithV2Env lack doc comments.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The linter for missing doc comments on exported identifiers should be enabled so this ... | null |
testcontainers__testcontainers-go__3115 | testcontainers/testcontainers-go | 3,115 | defect | 665a372ea3575b0c18f6f62ea9ebde8eb45134e4 | 9eb4b2bcd153ee38708e67b9ec262cb6aa68d3bf | feat(redis): add TLS support | - **chore: move existint options to its own file**
- **feat(redis): add TLS support**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
Adds TLS support for Redis, using https://github.com/mdelapenya/tlscert to genera... | diff --git a/docs/modules/redis.md b/docs/modules/redis.md
index c739db4699..cc9ee1453a 100644
--- a/docs/modules/redis.md
+++ b/docs/modules/redis.md
@@ -71,6 +71,14 @@ By default Redis saves snapshots of the dataset on disk, in a binary file called
In the case you have a custom config file for Redis, it's possible... | 22 | 21 | 4 | [{"id": "G0", "claim": "WithTLS should be a single opinionated option instead of taking three arguments (TLS port, secure URL, mtls disabled).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The module and its example still use go-redis v8 while the curre... | null |
testcontainers__testcontainers-go__3125 | testcontainers/testcontainers-go | 3,125 | defect | 70d92b9b3c891c3357e15c7c9258a1dd2fbe4a31 | 133d15e31105c0ea0efd88fb985eeda3fa6d069a | fix(dockermodelrunner): wait for the model to be pulled | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
It adds a backoff-retry strategy after pulling a model in order to verify the model was actually pulled.
The retry uses the passed context to determine the exit.
<!-- Mandatory... | diff --git a/docs/modules/dockermodelrunner.md b/docs/modules/dockermodelrunner.md
index 6a5379034f..5587fb14a9 100644
--- a/docs/modules/dockermodelrunner.md
+++ b/docs/modules/dockermodelrunner.md
@@ -76,7 +76,7 @@ The Docker Model Runner container exposes the following methods:
- Since testcontainers-go <a href="... | 2 | 2 | 1 | [{"id": "G0", "claim": "The retry loop via backoff.RetryNotify + InspectModel should be dropped and the response body simply read to completion instead, since the caller can handle retries if desired.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "A logg... | null |
testcontainers__testcontainers-go__3131 | testcontainers/testcontainers-go | 3,131 | defect | 3858aec299931e55926fdc26bf7b9bf71666e994 | 4c97c4aa954a1d7d7dfa248d3f0b65feea87cb48 | feat(valkey): add TLS support for Valkey | - **feat(valkey): add TLS support for Valkey**
- **docs(redis): update missing version markers**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
It copies what we added for Redis in #3115, but for Valkey.
It also adds the ve... | diff --git a/docs/modules/redis.md b/docs/modules/redis.md
index 58993fc181..e0c18bbaf8 100644
--- a/docs/modules/redis.md
+++ b/docs/modules/redis.md
@@ -73,10 +73,12 @@ In the case you have a custom config file for Redis, it's possible to copy that
#### WithTLS
+- Since testcontainers-go <a href="https://github.... | 1 | 1 | 0 | [{"id": "G0", "claim": "Because this NOOP Customizer boilerplate is a very common pattern, a reusable noop customiser should be created that can just be embedded, to avoid repeating this boilerplate (explicitly noted as not needed for this PR).", "category": "maintainability", "verdict": "supported", "priority": "P2", ... | null |
testcontainers__testcontainers-go__3149 | testcontainers/testcontainers-go | 3,149 | defect | a11fa34e409e48c32c61ed5d272e30eae32b1397 | 32fb8ac14e37f6f9c1ff133172f65bb46651b016 | fix(etcd): single node etcd cluster access | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
Added options listen-client-urls and advertise-client-urls for single etcd cluster execution.
<!-- Mandatory
Explain here the changes you made on the PR. Please explain th... | diff --git a/modules/etcd/etcd.go b/modules/etcd/etcd.go
index a715150bf1..76c68b32da 100644
--- a/modules/etcd/etcd.go
+++ b/modules/etcd/etcd.go
@@ -166,7 +166,10 @@ func configureCMD(settings options) []string {
cmds := []string{"etcd"}
if len(settings.nodeNames) == 0 {
- cmds = append(cmds, "--name=default")... | 3 | 3 | 1 | [{"id": "G0", "claim": "The table-driven test structure should be replaced with t.Run subtests plus a helper method, matching the team's test standards.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "CleanupContainer must be called before the error check... | null |
testcontainers__testcontainers-go__3151 | testcontainers/testcontainers-go | 3,151 | defect | b8ecbf4dbf0f1f8a1460724b223e22bb3820f6c1 | f07aea21d632681b3da631be397f4e86f6404ff3 | feat(cassandra): add ssl option cassandra | #3124
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
##... | diff --git a/modules/cassandra/cassandra.go b/modules/cassandra/cassandra.go
index e63d1c7e97..66adde3972 100644
--- a/modules/cassandra/cassandra.go
+++ b/modules/cassandra/cassandra.go
@@ -6,6 +6,7 @@ import (
"io"
"path/filepath"
"strings"
+ "time"
"github.com/docker/go-connections/nat"
@@ -14,15 +15,17 ... | 8 | 6 | 2 | [{"id": "G0", "claim": "The `c := &CassandraContainer{}` initialisation should be kept next to its usage instead of being hoisted up for no reason.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 2-minute startup timeout on the cqlsh wait che... | null |
testcontainers__testcontainers-go__3156 | testcontainers/testcontainers-go | 3,156 | defect | b8ecbf4dbf0f1f8a1460724b223e22bb3820f6c1 | 96b442c0f28b79d4c75a4b361e5afc2949565447 | feat: add more functional options for customising containers |
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
- **feat: add new option for AlwaysPull image**
- **feat: add new option for Lifecycle Hooks image**
- **feat: add new option for log consumer config**
- **feat: new option for ... | diff --git a/docs/features/common_functional_options.md b/docs/features/common_functional_options.md
index 91a7fb5fdd..84b301b7be 100644
--- a/docs/features/common_functional_options.md
+++ b/docs/features/common_functional_options.md
@@ -188,6 +188,12 @@ func (g *TestLogConsumer) Accept(l Log) {
}
```
+#### WithLo... | 5 | 3 | 1 | [{"id": "G0", "claim": "WithNetworkName should return an error when the network name is \"bridge\" instead of silently attaching without setting the aliases, so users get an indication when the result will not work as they expect.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc... | null |
testcontainers__testcontainers-go__3218 | testcontainers/testcontainers-go | 3,218 | defect | c6cd3578d2205c0b04cbd242b3903f8213cf65a0 | a1213e58b638b431af02cd33bb673552d0a32505 | feat: allow saving specific platforms for an image | ## What does this PR do?
This introduces a way to pass image save options (like platform) to the image client. This allows saving a specific architecture for an image.
## Why is it important?
With OCI multi-arch images, it is sometimes needed to save image for a different architecture than the current one. Thi... | diff --git a/docker.go b/docker.go
index eabdbd940d2..54c5a3315e1 100644
--- a/docker.go
+++ b/docker.go
@@ -1784,8 +1784,30 @@ func (p *DockerProvider) ListImages(ctx context.Context) ([]ImageInfo, error) {
return images, nil
}
+func SaveImageOptionWithPlatforms(plaforms ...specs.Platform) SaveImageOption {
+ ret... | 9 | 9 | 4 | [{"id": "G0", "claim": "Add doc comments to all the new public methods, including in the other files touched by the pull request.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Give the new option constructor a simpler name, such as WithPlatforms ... | null |
testcontainers__testcontainers-go__3241 | testcontainers/testcontainers-go | 3,241 | defect | 3835fa5cae360e932244a97e8b9cdeef13f773ce | 15549c64268159bf29009282400cc6ff7ed9a9d8 | feat(options): add WithProvider |
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
The generic container allows to set a provider for a container but this is not exposed via the options. This commit adds this capability so that it is possible to set th... | diff --git a/docs/features/common_functional_options.md b/docs/features/common_functional_options.md
index 928c4512173..3a62eb1802b 100644
--- a/docs/features/common_functional_options.md
+++ b/docs/features/common_functional_options.md
@@ -437,6 +437,13 @@ ctr, err := mymodule.Run(ctx, "docker.io/myservice:1.2.3",
... | 4 | 3 | 0 | [{"id": "G0", "claim": "The podman documentation should be checked and, if needed, updated so it is up-to-date with the new WithProvider option (e.g. the MacOS/Ryuk guidance).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docs hardcode \"Sinc... | null |
testcontainers__testcontainers-go__3258 | testcontainers/testcontainers-go | 3,258 | defect | c100f88ec720a6fc4e8ed984e3f4de5954a65e6e | 20c5ea4d5ed5fd86a005527991ae9ed62c56056a | feat(redpanda): add support for http proxy | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
1. Add suppo... | diff --git a/modules/redpanda/mounts/redpanda.yaml.tpl b/modules/redpanda/mounts/redpanda.yaml.tpl
index 935e1923ef..ec4f33b9a8 100644
--- a/modules/redpanda/mounts/redpanda.yaml.tpl
+++ b/modules/redpanda/mounts/redpanda.yaml.tpl
@@ -72,4 +72,24 @@ schema_registry_client:
- address: localhost
port: 9093
... | 6 | 4 | 2 | [{"id": "G0", "claim": "Questioning whether the pandaproxy listener in redpanda.yaml.tpl needs to wildcard-bind 0.0.0.0 or could bind localhost instead.", "category": "security", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new HTTP Proxy options and HTTPProxyAddress are ... | null |
testcontainers__testcontainers-go__3266 | testcontainers/testcontainers-go | 3,266 | defect | 901b0b9f43f23198cc640f2e218b46d833eaa6f6 | 4b9458c8d978ad33c971ca171e83d5e694a114c0 | feat(nebulagraph): add NebulaGraph module | ## What does this PR do?
This PR introduces a new NebulaGraph module for testcontainers-go.
## Why is it important?
It will enable NebulaGraph users utilize database as testcontainers in their project
## Related issues
- Closes #3265
### How to test this PR
Check written [tests](https://github.com/eg... | diff --git a/docs/modules/nebulagraph.md b/docs/modules/nebulagraph.md
new file mode 100644
index 0000000000..3a502a14fa
--- /dev/null
+++ b/docs/modules/nebulagraph.md
@@ -0,0 +1,97 @@
+# NebulaGraph Module
+
+Since <a href="https://github.com/testcontainers/testcontainers-go"><span class="tc-version">:material-tag: m... | 13 | 10 | 4 | [{"id": "G0", "claim": "The new modules/nebulagraph/go.mod is out of sync and `go mod tidy` needs to be run to sync it.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The module should expose a separate `Run` function for each container type (RunGra... | null |
testcontainers__testcontainers-go__3272 | testcontainers/testcontainers-go | 3,272 | defect | a23f12928513a3977f306bd3a9b77da00a9324eb | 1de166d292affd63f5357874f84320ae238847c9 | fix(registry): update `WithHtpasswd` to use `os.CreateTemp` instead of `os.Create` with `filepath.Join`. | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
when startin... | diff --git a/modules/registry/options.go b/modules/registry/options.go
index adfe3fff072..f5253aedf79 100644
--- a/modules/registry/options.go
+++ b/modules/registry/options.go
@@ -3,7 +3,6 @@ package registry
import (
"fmt"
"os"
- "path/filepath"
"github.com/testcontainers/testcontainers-go"
)
@@ -37,7 +36,7... | 1 | 1 | 1 | [{"id": "G0", "claim": "A test should be added covering the WithHtpasswd fix, as described in the PR description.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testcontainers__testcontainers-go__3275 | testcontainers/testcontainers-go | 3,275 | defect | a23f12928513a3977f306bd3a9b77da00a9324eb | 606572ec60cb2b579259b16ad0b943fdf14b4e6a | feat(registry): add helper functions to pull and tag images | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
This PR adds a... | diff --git a/docs/modules/registry.md b/docs/modules/registry.md
index 30103ee280..31201eacce 100644
--- a/docs/modules/registry.md
+++ b/docs/modules/registry.md
@@ -137,6 +137,34 @@ The `PushImage` method allows to push an image to the Registry. It receives the
If the push operation is successful, the method will ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The comment '// defaulTag is v1.2.3' in the pullingImage example block misspells 'defaultTag'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment '// defaulTag is v1.2.3' in the taggingImage example block misspells ... | null |
testcontainers__testcontainers-go__3276 | testcontainers/testcontainers-go | 3,276 | defect | 103149723ce3bed578c88ab84181d0a00d532b18 | 03eed62d3ee866808786c610e853daacc0afeea8 | fix(kafka): strip architecture suffix from Kafka image tags for semver parsing | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This PR strips the architecture suffix (e.g. .arm64) from Kafka image tags.
## Why is it important?
Newer Kafka Docker images have started including architecture suf... | diff --git a/modules/kafka/kafka.go b/modules/kafka/kafka.go
index b1342de98f..9a99314f9d 100644
--- a/modules/kafka/kafka.go
+++ b/modules/kafka/kafka.go
@@ -212,6 +212,11 @@ func validateKRaftVersion(fqName string) error {
version = "v" + version
}
+ // remove the architecture suffix
+ if strings.HasSuffix(ver... | 3 | 1 | 1 | [{"id": "G0", "claim": "The PR should not silently strip architecture suffixes to make tags parse as semver; instead it should reject image tags carrying .amd64/.arm64 suffixes with an error telling users to use a multi-architecture image (the change M008 proposed and M011 asked to apply).", "category": "design", "verd... | null |
testcontainers__testcontainers-go__3300 | testcontainers/testcontainers-go | 3,300 | defect | 6e14bda839461bc5c76bd76bb7ff8d36cc9662d7 | 362ea4eced0fd3017b8a2ccf58008d567b66aae8 | chore(atlas): simplify host-port calculation in tests | - **chore: simpler host-port detection in tests**
- **chore: ignore coverage files**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
It adds a simplification in the tests, something I missed to commit while reviewing #3254
I... | diff --git a/.gitignore b/.gitignore
index be65781dff..b5fd75ccce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,6 @@ TEST-*.xml
# Environment variables
.env
+
+# Coverage files
+coverage.out
diff --git a/modules/mongodb/atlaslocal/atlaslocal_test.go b/modules/mongodb/atlaslocal/atlaslocal_test.go
index b462... | 3 | 1 | 1 | [{"id": "G0", "claim": "Broaden the new coverage ignore patterns in .gitignore (e.g. **/coverage.out, cover.out, *.coverprofile) so coverage files in submodules and tests aren't accidentally committed.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim... | null |
testcontainers__testcontainers-go__3304 | testcontainers/testcontainers-go | 3,304 | defect | d9a74366beee8c7a7ef7ecd409db14ce9c8da193 | 811d7f4dc66a2e3f88d7c848becda756ebe04602 | chore: use the Run funcion in tests and docs (part 1) | - **chore: migrate tests to Run**
- **docs: update quickstart with the Run function**
- **chore: update more tests**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This is the first chunk of many PRs trying to make progress ... | diff --git a/container_test.go b/container_test.go
index 2e7aebce41..d60812ffaf 100644
--- a/container_test.go
+++ b/container_test.go
@@ -278,7 +278,7 @@ func Test_BuildImageWithContexts(t *testing.T) {
ContextArchive: func() (io.ReadSeeker, error) {
return nil, nil
},
- ExpectedError: "create container... | 16 | 4 | 0 | [{"id": "G0", "claim": "Use filepath.Join for HostFilePath instead of string concatenation with \"/\", which can break on Windows hosts.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The quickstart code block (lines 33-43) uses hard tabs that s... | null |
testcontainers__testcontainers-go__3305 | testcontainers/testcontainers-go | 3,305 | defect | 21b248e5e26506bf492fd544c5904105fd43773f | d7bce9d7c9b7f75d616555d38751e317dd0b651c | chore: use Run function (part 2) | - **chore: use Run in log consumer tests**
- **chore: use Run in reaper tests**
- **chore: use Run in sshd container**
- **chore: use Run in wait strategies**
- **chore: use Run in reuse**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does ... | diff --git a/docs/features/creating_container.md b/docs/features/creating_container.md
index a101c9fd21..36712e0078 100644
--- a/docs/features/creating_container.md
+++ b/docs/features/creating_container.md
@@ -196,11 +196,12 @@ The aforementioned `Run` function represents a straightforward way to configure
## Reusa... | 9 | 2 | 0 | [{"id": "G0", "claim": "Tighten the wording and fix the singular/plural grammar of the WithReuseByName description in docs/features/creating_container.md.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The Go code blocks added to docs/features/cre... | null |
testcontainers__testcontainers-go__3308 | testcontainers/testcontainers-go | 3,308 | defect | 3d3c8ee7be3812b5e163d3029b9ef0daece47374 | d4fc16cd47dc1b5cbe2846c6c2784a8c6b93191a | fix: use path.Join instead of url.JoinPath when prepending a custom registry to an image | ## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
This MR swaps `url.JoinPath` with `path.Join` in image substitutors.
## Why is it important?
<!-- Mandatory
Explain here the W... | diff --git a/image_substitutors_test.go b/image_substitutors_test.go
index ed4cf2631d..274ad1ee1f 100644
--- a/image_substitutors_test.go
+++ b/image_substitutors_test.go
@@ -66,6 +66,14 @@ func TestPrependHubRegistrySubstitutor(t *testing.T) {
require.Equalf(t, "my-registry/org/user/foo:latest", img, "expected m... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new subtest should be named \"registry-with-port\" without spaces, following the encouraged naming convention for new tests.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
testcontainers__testcontainers-go__3320 | testcontainers/testcontainers-go | 3,320 | defect | 4b48dd290ea11653f327529bc6d83031e4443e98 | 348c1750ad72eaa4f1db1ca2192dcb63cf4879e3 | chore(artemis): use Run function | - **chore(artemis): use Run function**
- **chore: use a constant**
- **chore: more robust wait strategy using listening port**
- **chore: set credentials properly**
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
Use Run func... | diff --git a/modules/artemis/artemis.go b/modules/artemis/artemis.go
index e639be7dda..40dd547f17 100644
--- a/modules/artemis/artemis.go
+++ b/modules/artemis/artemis.go
@@ -3,6 +3,7 @@ package artemis
import (
"context"
"fmt"
+ "strings"
"github.com/docker/go-connections/nat"
@@ -13,6 +14,8 @@ import (
co... | 9 | 4 | 0 | [{"id": "G0", "claim": "Passing string constants to wait.ForListeningPort will not compile because ForListeningPort expects nat.Port, and the ports should be explicitly converted with nat.Port(...).", "category": "correctness", "verdict": "opposed", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "WithC... | null |
testcontainers__testcontainers-go__3402 | testcontainers/testcontainers-go | 3,402 | defect | e3c6250dcd1538deccadd66d3a765ab0a05e9c54 | 026c4d7bb7ffa2e2934e451fa4c0db28a1f8efe9 | chore(databend): use Run function | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
Use Run function in the Databend module
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design archite... | diff --git a/modules/databend/databend.go b/modules/databend/databend.go
index e702a727dc..35c81fecee 100644
--- a/modules/databend/databend.go
+++ b/modules/databend/databend.go
@@ -11,10 +11,10 @@ import (
)
const (
- databendUser = "databend"
defaultUser = "databend"
defaultPassword = "dat... | 2 | 2 | 1 | [{"id": "G0", "claim": "Appending every opt into moduleOpts relies on the request-phase Customize method, which is a NOOP for DatabendOption, so caller-provided DatabendOptions (e.g. ones mutating DatabendContainer state like database selection) are now silently dropped after the migration to testcontainers.Run — a reg... | null |
testcontainers__testcontainers-go__3408 | testcontainers/testcontainers-go | 3,408 | defect | 75163a4dbd45e2e7c5de6aa417dffb6c11c16c53 | c99a59fb52df01a8c23a81bf78199b5f0896f757 | chore(milvus): update Milvus SDK to new module | <!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, etc.
-->
The module [... | diff --git a/modules/milvus/examples_test.go b/modules/milvus/examples_test.go
index a8242f15b2c..0b23f069e56 100644
--- a/modules/milvus/examples_test.go
+++ b/modules/milvus/examples_test.go
@@ -5,8 +5,8 @@ import (
"fmt"
"log"
- "github.com/milvus-io/milvus-sdk-go/v2/client"
- "github.com/milvus-io/milvus-sdk-... | 4 | 4 | 0 | [{"id": "G0", "claim": "In TestMilvus the deferred milvusClient.Close should use the subtest context (ctx) instead of the parent t.Context() so cleanup stays consistent with the subtest scope.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In Exampl... | null |
testcontainers__testcontainers-go__3411 | testcontainers/testcontainers-go | 3,411 | defect | 46d68aa2e9ec786e941a3b3fb3c23448521a11f4 | 2dd11242338017356e3a271d70d7e32e1cddfa88 | chore(gcloud): use Run function | - **chore(gcloud): use Run in deprecated constructors**
- **chore(bigquery): use Run function**
- **chore(bigtable): use Run function**
- **chore(datastore): use Run function**
- **chore: extract ports to constants**
- **chore(firestore): use Run function**
- **chore(pubsub): use Run function**
- **chore(spanner): use ... | diff --git a/modules/gcloud/bigquery.go b/modules/gcloud/bigquery.go
index 5eabedddab..7e7cae63d1 100644
--- a/modules/gcloud/bigquery.go
+++ b/modules/gcloud/bigquery.go
@@ -18,34 +18,32 @@ func RunBigQueryContainer(ctx context.Context, opts ...testcontainers.ContainerC
// RunBigQuery creates an instance of the GClou... | 7 | 3 | 1 | [{"id": "G0", "claim": "In the deprecated wrapper functions (RunBigTable in bigtable.go, RunDatastore in datastore.go, RunPubsub in pubsub.go) user opts are appended to moduleOpts before the default WithCmd, so the default command overrides any user-provided command, and the ordering is inconsistent with the new Run fu... | null |
testcontainers__testcontainers-go__3414 | testcontainers/testcontainers-go | 3,414 | defect | d68b675a2dfe50a4fd79ea724f5c9aef5a9030a6 | 898306a4c4a97a55c4c599f38185527305dfcc88 | chore(k6|localstack|kafka|mariadb): use Run function | ## What does this PR do?
Use the Run function in k6, localstack, kafka, and mariadb modules
## Why is it important?
Migrate modules to the new API, improving consistency and leveraging the latest testcontainers functionality.
## Related issues
- Relates to https://github.com/testcontainers/testcontainers-go/pull/3... | diff --git a/modules/k3s/k3s.go b/modules/k3s/k3s.go
index 89f065ac2d..e69fbc8655 100644
--- a/modules/k3s/k3s.go
+++ b/modules/k3s/k3s.go
@@ -39,12 +39,10 @@ func WithManifest(manifestPath string) testcontainers.CustomizeRequestOption {
manifest := filepath.Base(manifestPath)
target := k3sManifests + manifest
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Calling validateKRaftVersion will panic whenever img lacks a :<tag> because the helper slices at strings.LastIndex, which returns -1, so the helper should be guarded to gracefully skip validation when no tag is present.", "category": "correctness", "verdict": "supported", "priority": "P0", "scop... | null |
testcontainers__testcontainers-go__3428 | testcontainers/testcontainers-go | 3,428 | defect | eba852e7cadae35a57ee39dd9dbecd4c4be0d202 | ef27fed11394c506dec7a63e16a60b2a8942b7ba | chore(rabbitmq)!: use Run function | ## What does this PR do?
Use the Run function in rabbitmq
## Why is it important?
Migrate modules to the new API, improving consistency and leveraging the latest testcontainers functionality.
## Related issues
- Relates to https://github.com/testcontainers/testcontainers-go/pull/3174
🤖 Generated with [Claude Cod... | diff --git a/modules/rabbitmq/rabbitmq.go b/modules/rabbitmq/rabbitmq.go
index b9e0264d76..086c1040c0 100644
--- a/modules/rabbitmq/rabbitmq.go
+++ b/modules/rabbitmq/rabbitmq.go
@@ -80,46 +80,12 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize
// Run creates an instance of the Rab... | 1 | 1 | 1 | [{"id": "G0", "claim": "The hardcoded guest/default credentials in moduleOpts mean a custom WithAdminCredentials (WithAdminUsername/WithAdminPassword) option only mutates settings while the container boots with the wrong user/pass, so the returned RabbitMQContainer reports credentials clients cannot authenticate with —... | null |
testcontainers__testcontainers-go__3445 | testcontainers/testcontainers-go | 3,445 | defect | d0b615400c235777896a4da71a847b910b23a26f | aae4bafded8a9fab4197b9e986a822f12a3642d2 | chore(modulegen): use Run function when generating modules | ## What does this PR do?
Updates the modulegen module template to use the `testcontainers.Run()` function with the `moduleOpts` pattern, and improves module development documentation with comprehensive best practices.
### Changes:
1. **Module Template (`_template/module.go.tmpl`)**:
- Updated to use `testcontaine... | diff --git a/docs/modules/index.md b/docs/modules/index.md
index 3991e8c0cd..31eb610530 100644
--- a/docs/modules/index.md
+++ b/docs/modules/index.md
@@ -112,9 +112,82 @@ We are going to propose a set of steps to follow when adding types and methods t
!!!warning
The `StartContainer` function will be eventually d... | 5 | 5 | 1 | [{"id": "G0", "claim": "The template's \"Add default options\" comment is misleading because user options are appended immediately without any module defaults, so the generated code does not follow the documented defaults-then-user-options ordering; fix the comment and initialize the slice with module defaults.", "cate... | null |
testcontainers__testcontainers-go__3451 | testcontainers/testcontainers-go | 3,451 | defect | 931625ea73adbc37f1bb10670b26128924c046e8 | 72e4633300fbbe619e88bfcbc9d974666c702ad7 | feat(azure): reduce time/memory by running specific sub-services | ## What does this PR do?
The default MS "azurite" container entrypoint runs the blob, queue and table services internally. The azurite Testcontainers module has an option to specify these services but it's not exposed to consumers and therefore always contains all 3 services.
This PR uses the options pattern esta... | diff --git a/modules/azure/azurite/azurite.go b/modules/azure/azurite/azurite.go
index 9eeabd5a54..ea85d560e5 100644
--- a/modules/azure/azurite/azurite.go
+++ b/modules/azure/azurite/azurite.go
@@ -72,35 +72,50 @@ func (c *Container) serviceURL(ctx context.Context, srv service) (string, error)
// Run creates an ins... | 13 | 7 | 3 | [{"id": "G0", "claim": "WithEnabledServices() can be called with no arguments, leaving EnabledServices empty so the container starts with no services enabled, which is likely a configuration error; add validation against the empty service list.", "category": "correctness", "verdict": "supported", "priority": "P1", "sco... | null |
testcontainers__testcontainers-go__3452 | testcontainers/testcontainers-go | 3,452 | defect | 32220d6dc41fe48bbc44c8e0f584bb6d56bf34da | de2ec7366401593a5430796144453dac068ac980 | feat(azure): add cosmosdb module | ## What does this PR do?
Introduces CosmosDB module.
## Why is it important?
ComsosDB container can be managed through Golang.
## How to test this PR
It contains tests that run operations against the Cosmos DB container. | diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 30207b4f306..957ac3bd7ec 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -26,6 +26,7 @@ updates:
- /modules/cockroachdb
- /modules/compose
- /modules/consul
+ - /modules/cosmosdb
- /modules/... | 17 | 11 | 2 | [{"id": "G0", "claim": "The fenced code block in docs/modules/cosmosdb.md should specify a language (e.g. shell) for syntax highlighting.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Using \"http\" as defaultProtocol will break clients unless TL... | null |
testcontainers__testcontainers-go__3482 | testcontainers/testcontainers-go | 3,482 | defect | aa757711bb8a0efe76866a31ef30e5fc5dec03a3 | df49f93fe6e5346fba80a0254de28d49955175eb | fix: docker auth for docker.io images | ## What does this PR do?
When doing a Docker pull on an image with the default registry `docker.io`, the auth helper doesn't match the image to the authentication data stored by the engine under `https://index.docker.io/v1` causing the error: `credentials not found in native keychain`
## Why is it important?
T... | diff --git a/docker_auth.go b/docker_auth.go
index 58b3ef26376..25b8fe6d856 100644
--- a/docker_auth.go
+++ b/docker_auth.go
@@ -42,6 +42,10 @@ func dockerImageAuth(ctx context.Context, image string, configs map[string]regis
defaultRegistry := defaultRegistryFn(ctx)
reg := core.ExtractRegistry(image, defaultRegistr... | 4 | 3 | 2 | [{"id": "G0", "claim": "The Docker Hub alias normalization in dockerImageAuth partially duplicates and conflicts with core.ExtractRegistry's behavior, and should be removed or consolidated into core.ExtractRegistry.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id"... | null |
testcontainers__testcontainers-go__3552 | testcontainers/testcontainers-go | 3,552 | defect | b8c77f2139bf958bc68d89534576e9f71fb9d0e1 | 15f499d678c8433c3154debf103d0e389db383db | feat(chroma): update to chroma 1.x | ... | diff --git a/docs/modules/chroma.md b/docs/modules/chroma.md
index a8372b02c5..523588fc4d 100644
--- a/docs/modules/chroma.md
+++ b/docs/modules/chroma.md
@@ -47,7 +47,7 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
#### Image
Use the second argument in the `Run` function to se... | 8 | 7 | 2 | [{"id": "G0", "claim": "The hardcoded float distance 0.7525849 in the collections example's expected output may be fragile if the default embedding function or chroma-go changes, so a tolerance-based assertion or an explanatory comment should be used.", "category": "testing", "verdict": "supported", "priority": "P1", "... | null |
testcontainers__testcontainers-go__3556 | testcontainers/testcontainers-go | 3,556 | defect | 3894e5768a3159eb2568acd32eb2d3da2c423d33 | 6eca9587599cdbe4901b4ba1c6ab025ff299052b | feat: add Forgejo module | ## Summary
- Add a new testcontainers module for [Forgejo](https://forgejo.org/), a self-hosted Git forge (community-driven fork of Gitea)
- The module scaffolded with `modulegen` and enhanced with Forgejo-specific configuration
- Container starts with SQLite and `INSTALL_LOCK=true` pre-configured for immediate test u... | diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 30207b4f30..70aaf2d21c 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -35,6 +35,7 @@ updates:
- /modules/dynamodb
- /modules/elasticsearch
- /modules/etcd
+ - /modules/forgejo
- /modules/gc... | 12 | 11 | 5 | [{"id": "G0", "claim": "The fenced code block in docs/modules/forgejo.md is missing a language identifier, flagged by markdownlint (MD040).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "WithAdminCredentials and WithConfig write directly to req.En... | null |
testcontainers__testcontainers-go__3568 | testcontainers/testcontainers-go | 3,568 | defect | 32aac58405ea6918576a250002f1cd746f4f1480 | 9c7caf633f943b8469bcdc2bdf751dfd2e7a6f1b | chore(compose): update to compose-v5 | ## What does this PR do?
Upgrades the `modules/compose` module from Docker Compose v2 (`github.com/docker/compose/v2`) to v5 (`github.com/docker/compose/v5`), using the official SDK introduced in v5.
### Key changes:
- **Dependency upgrade**: `docker/compose/v2 v2.40.2` → `docker/compose/v5 v5.1.0`, `compose-spec/co... | diff --git a/.github/workflows/ci-lint-go.yml b/.github/workflows/ci-lint-go.yml
index 0185ef3f98..cca86d4577 100644
--- a/.github/workflows/ci-lint-go.yml
+++ b/.github/workflows/ci-lint-go.yml
@@ -30,11 +30,27 @@ jobs:
cache-dependency-path: "${{ inputs.project-directory == '' && '.' || inputs.project-di... | 5 | 2 | 1 | [{"id": "G0", "claim": "The golangci-lint version mapping in ci-lint-go.yml should use an explicit case statement per supported Go minor and fail fast for unmapped versions instead of silently reusing v2.9.0 for future Go versions like 1.26.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope"... | null |
testcontainers__testcontainers-go__3574 | testcontainers/testcontainers-go | 3,574 | defect | 32aac58405ea6918576a250002f1cd746f4f1480 | bdb6d1845bfffc280d63b9563cbecc9f3ecd0e67 | feat: improve container conflict detection | ## What does this PR do?
Modify the container conflict detection regex for improved Podman compatibility.
The shape of the conflict error comes from Podman's [test suite](https://github.com/containers/podman/blob/v5.8.0/test/system/030-run.bats#L1706).
## Why is it important?
Container creation conflicts ha... | diff --git a/docker.go b/docker.go
index 9a2421485bc..9cfe50fcc39 100644
--- a/docker.go
+++ b/docker.go
@@ -54,7 +54,7 @@ const (
var (
// createContainerFailDueToNameConflictRegex is a regular expression that matches the container is already in use error.
- createContainerFailDueToNameConflictRegex = regexp.Must... | 3 | 2 | 2 | [{"id": "G0", "claim": "The new test table should add a case covering the retryable branch for errors that only satisfy the Timeout() bool interface in reaperSpawner.retryError, so that path cannot regress unnoticed.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1",... | null |
testcontainers__testcontainers-go__775 | testcontainers/testcontainers-go | 775 | defect | 6aa1df45deda3d01839fc0209990b215f68772d6 | de0bfd87c0a988d1bafe9d2b1635838fc70af6e7 | feat: support for titles in examples |
<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->
## What does this PR do?
This PR is adding a flag to the examples generator so that it's possible to define a camelcase version of the name to be used when initials are present.
It will allow creating ... | diff --git a/docs/examples/index.md b/docs/examples/index.md
index 5add0c7742..a74a5cc4f9 100644
--- a/docs/examples/index.md
+++ b/docs/examples/index.md
@@ -23,10 +23,11 @@ We have provided a command line tool to generate the scaffolding for the code of
|------|------|----------|-------------|
| -name | string | Ye... | 5 | 3 | 0 | [{"id": "G0", "claim": "The docs line contains the typo 'alphabeticall' and should read 'alphabetical'.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The new template functions take no parameter and instead read the captured example value.", "c... | null |
testcontainers__testcontainers-go__782 | testcontainers/testcontainers-go | 782 | defect | e70824e563b5728123b3117b5410a11e3e5bfeca | 9a660dcfca50a55ed1fb958095d5864258415c11 | Verify Reaper state to create new or return existing instance | ## What does this PR do?
Resolves https://github.com/testcontainers/testcontainers-go/issues/764 and also makes https://github.com/testcontainers/testcontainers-go/pull/258 (PR) obsolete.
As the issue describes, the Reaper container might exit if there's no connection for a longer time. For example when running m... | diff --git a/docker.go b/docker.go
index 0767406a8c..e49af34f69 100644
--- a/docker.go
+++ b/docker.go
@@ -972,7 +972,7 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque
// the reaper does not need to start a reaper for itself
isReaperContainer := strings.EqualFold(req.Image, reape... | 3 | 2 | 0 | [{"id": "G0", "claim": "The new Test_ReaperReusedIfHealthy should not skip itself under `testing.Short()`; the short/non-short separation is not needed here, so remove the skip guard (the newly added test only) from this PR.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id... | null |
testcontainers__testcontainers-java__10034 | testcontainers/testcontainers-java | 10,034 | defect | 6e104da1d6e8a4188451f556e9c7cb4ce8eb3164 | 6a2a8233f6171c080dee8e69b60eb6f5e6b8d855 | Add default database name to MongoDB Atlas | <!--
Thanks for contributing to Testcontainers. Please review the following notes before
submitting a pull request.
New Modules:
If you are contributing a new module, please add your module name to the following files:
* `./.github/ISSUE_TEMPLATE/bug_report.yaml`
* `./.github/ISSUE_TEMPLATE/enhancement.yaml... | diff --git a/modules/mongodb/src/main/java/org/testcontainers/mongodb/MongoDBAtlasLocalContainer.java b/modules/mongodb/src/main/java/org/testcontainers/mongodb/MongoDBAtlasLocalContainer.java
index 52067c01ff2..47323f5121b 100644
--- a/modules/mongodb/src/main/java/org/testcontainers/mongodb/MongoDBAtlasLocalContainer... | 3 | 3 | 1 | [{"id": "G0", "claim": "The new public methods should be named getDatabaseConnectionString(...) instead of getReplicaSetUrl(...), with 'database specific connection string' javadoc wording, since 'connectionString' is consistent with the existing getConnectionString() and the value is not replica-set related.", "catego... | null |
testcontainers__testcontainers-java__10170 | testcontainers/testcontainers-java | 10,170 | defect | 037eedbd9111f8be4a49ddf949581a67bde21ce4 | 0c5dd0e5ddf2f539c7824f2b4e3ab1350b5d3a8c | Support new chromadb api version | ChromaDB 1.0.0 has been released recently.
- https://github.com/chroma-core/chroma/releases/tag/1.0.0
- https://hub.docker.com/r/chromadb/chroma/tags?name=1.0.0
With this release, the v1 APIs have been deprecated.
To support the new v2 APIs, we have added version branching.
For the version branching work, I re... | diff --git a/modules/chromadb/src/main/java/org/testcontainers/chromadb/ChromaDBContainer.java b/modules/chromadb/src/main/java/org/testcontainers/chromadb/ChromaDBContainer.java
index a1bccf3904f..3065bf164df 100644
--- a/modules/chromadb/src/main/java/org/testcontainers/chromadb/ChromaDBContainer.java
+++ b/modules/c... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new try-with-resources in testVersion2 should be written without the stray '// container {' and '// }' comments, per the reviewer's suggestion block.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
testcontainers__testcontainers-java__10185 | testcontainers/testcontainers-java | 10,185 | defect | e730674537dfa297a60311a7c13b953b8b82a67d | edf87d37cd10ab53f536fbb8c911ae8f10032430 | Make MySQLContainer compatible with mysql:9.3.0 | Fixes #10184 | diff --git a/modules/mysql/src/main/resources/mysql-default-conf/my.cnf b/modules/mysql/src/main/resources/mysql-default-conf/my.cnf
index 6fc2129357f..b22aa7d9e93 100644
--- a/modules/mysql/src/main/resources/mysql-default-conf/my.cnf
+++ b/modules/mysql/src/main/resources/mysql-default-conf/my.cnf
@@ -43,7 +43,6 @@ i... | 4 | 3 | 3 | [{"id": "G0", "claim": "The existing test images (mysql:5.7, 8.0, 8.3) should not be commented out in MySQLRootAccountTest; the new image just needed to be added to the list like elsewhere.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Updating the my.... | null |
testcontainers__testcontainers-java__10256 | testcontainers/testcontainers-java | 10,256 | defect | a2197e102cd042243d7b2cc210470f3fa6ed15eb | ca5a3164c081017024786eb3fc21db428e7ec076 | Expose Loki in LgtmContainer | Followup from https://github.com/testcontainers/testcontainers-java/pull/10192
Exposes the loki port to allow for querying and validating logs. | diff --git a/modules/grafana/build.gradle b/modules/grafana/build.gradle
index d5c815018d0..f49a8ade726 100644
--- a/modules/grafana/build.gradle
+++ b/modules/grafana/build.gradle
@@ -12,4 +12,13 @@ dependencies {
testImplementation 'io.opentelemetry:opentelemetry-api'
testImplementation 'io.opentelemetry:op... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should focus on just exposing Loki rather than including the unrelated JUnit test refactoring and build configuration changes.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testcontainers__testcontainers-java__10280 | testcontainers/testcontainers-java | 10,280 | defect | 2e0ef57b77d74ca25b01d7c18a7c0445ac743049 | 6fc39f28fce1095006335a086d86a314476ff3e4 | Add support to clickhouse JDBC V2 | ### Description
This pull request adds support for **ClickHouse JDBC v2 driver** to the Testcontainers ClickHouse module.
#### Context
- The newer ClickHouse JDBC v2 driver (`com.clickhouse.jdbc.Driver` and `com.clickhouse.jdbc.ClickHouseDriver`) introduces enhanced functionality and compatibility with ClickHo... | diff --git a/docs/modules/databases/r2dbc.md b/docs/modules/databases/r2dbc.md
index 055d4ad7b0f..5aded5431ca 100644
--- a/docs/modules/databases/r2dbc.md
+++ b/docs/modules/databases/r2dbc.md
@@ -35,7 +35,7 @@ So that the URL becomes:
#### Using ClickHouse
-`r2dbc:tc:clickhouse:///databasename?TC_IMAGE_TAG=21.9.2... | 6 | 4 | 0 | [{"id": "G0", "claim": "Do not apply changes to the deprecated org.testcontainers.containers.ClickHouseContainer class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the stray blank line added at the start of getDriverClassName in the clickhouse ... | null |
testcontainers__testcontainers-java__10526 | testcontainers/testcontainers-java | 10,526 | defect | 35577878c7f0a5e308c74377c5e3fecb1f40adc7 | ae6405fa0b5044788c5cd5b9d8a2d877459a3086 | Add method getHttpUrl for ClickHouseContainer | In Clickhouse tests, when using the official client (https://clickhouse.com/docs/integrations/language-clients/java/client) , you need an http URL. I think it would be logical to add this method. | diff --git a/modules/clickhouse/src/main/java/org/testcontainers/clickhouse/ClickHouseContainer.java b/modules/clickhouse/src/main/java/org/testcontainers/clickhouse/ClickHouseContainer.java
index d3256124de1..02a02267ec5 100644
--- a/modules/clickhouse/src/main/java/org/testcontainers/clickhouse/ClickHouseContainer.ja... | 1 | 1 | 1 | [{"id": "G0", "claim": "Update the new test so that, instead of asserting the URL against itself, it performs an operation using the ClickHouse Client.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testcontainers__testcontainers-java__10779 | testcontainers/testcontainers-java | 10,779 | defect | 4eca3bdaa3178b99c42c7ecc4ce29ff37ad20896 | b9dad59db20f820eea28b7f289f29eb78417a497 | Expose gRPC endpoint from BigQueryEmulator | BigQueryEmulator exposes two endpoints, for http and for gRPC, only the http was exposed by BigQueryEmulatorContainer.
The gRPC port needs to be exposed, as BigQueryWriteSettings needs this port to be configured correctly.
Included test case shows configuration setup and validates that it works as expected.
| diff --git a/modules/gcloud/src/main/java/org/testcontainers/containers/BigQueryEmulatorContainer.java b/modules/gcloud/src/main/java/org/testcontainers/containers/BigQueryEmulatorContainer.java
index 6c305a50537..6831785b0a5 100644
--- a/modules/gcloud/src/main/java/org/testcontainers/containers/BigQueryEmulatorContai... | 2 | 2 | 0 | [{"id": "G0", "claim": "Move the test to the end of the test class and rewrite it as a successful operation.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Move the getBigQuery helper method to the end of the file.", "category": "maintainability", "verdi... | null |
testcontainers__testcontainers-java__11564 | testcontainers/testcontainers-java | 11,564 | defect | 5323acdeb4d399b2dc1a61eb07012a39f86643e6 | 46e4c4ba769d775ec0f972c51b64cd84a87b7bf0 | Improve k6 docs | This updates the K6 module documentation to show a JUnit-style example test, not just the container setup and script snippet.
The docs now include the existing `K6ContainerTests` flow so users can see the expected test shape end-to-end:
- configure the container
- start the container
- wait for the test run output
- a... | diff --git a/docs/modules/k6.md b/docs/modules/k6.md
index 4783ca1e5ad..1a13c09e895 100644
--- a/docs/modules/k6.md
+++ b/docs/modules/k6.md
@@ -11,12 +11,17 @@ Testcontainers module for [k6](https://registry.hub.docker.com/r/grafana/k6).
## Basic script execution
-Execute a simple k6 test script, `test.js`, with ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The docs intro sentence should read \"You can start a K6 container instance from any Java application by using:\" instead of the longer sentence about a typical JUnit 5 test.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T... | null |
testcontainers__testcontainers-java__9662 | testcontainers/testcontainers-java | 9,662 | defect | df40cd8ba35cc0fdf4a05bebaff053c97b00b7d7 | ecb1848d6e9fc3d2719658025e1e9b3d4f0068b3 | Fix connection leak in JdbcDatabaseDelegate | A new connection was opened every time, without being closed.
<!--
Thanks for contributing to Testcontainers. Please review the following notes before
submitting a pull request.
New Modules:
If you are contributing a new module, please add your module name to the following files:
* `./.github/ISSUE_TEMPLA... | diff --git a/modules/jdbc/src/main/java/org/testcontainers/jdbc/JdbcDatabaseDelegate.java b/modules/jdbc/src/main/java/org/testcontainers/jdbc/JdbcDatabaseDelegate.java
index 3c33eba8d5b..1f600507b85 100644
--- a/modules/jdbc/src/main/java/org/testcontainers/jdbc/JdbcDatabaseDelegate.java
+++ b/modules/jdbc/src/main/ja... | 1 | 1 | 1 | [{"id": "G0", "claim": "In closeConnectionQuietly the statement should be closed before the connection, so that a failure in statement.close() cannot skip connection.close() and leave the leak this PR sets out to fix.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testcontainers__testcontainers-java__9665 | testcontainers/testcontainers-java | 9,665 | defect | 2707f3143d3cfa8351f727bfd5752c1155818bd6 | fa3e337d7df7576f03fa1c02c2a7e00bdee0411b | Add AzureEventHubsContainer | - Add Azure Event Hubs Emulator container
- Implement new test case
- Update Azure documentation
Must be merged after: #9661
Relates to: https://github.com/testcontainers/testcontainers-java/discussions/9607#discussioncomment-11525985
<!--
Thanks for contributing to Testcontainers. Please review the following... | diff --git a/docs/modules/azure.md b/docs/modules/azure.md
index 19c141c7639..741bedaa1dc 100644
--- a/docs/modules/azure.md
+++ b/docs/modules/azure.md
@@ -5,11 +5,12 @@ This module is INCUBATING. While it is ready for use and operational in the curr
Testcontainers module for the Microsoft Azure's [SDK](https://git... | 7 | 7 | 3 | [{"id": "G0", "claim": "The container should not override start(); Azurite should be declared as a dependency with dependsOn in the constructor, and the hardcoded fixed Azurite version is a concern.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "withConf... | null |
testcontainers__testcontainers-java__9795 | testcontainers/testcontainers-java | 9,795 | defect | 2707f3143d3cfa8351f727bfd5752c1155818bd6 | 5246f6db58f629b9e1b605a1b30d626b64d47dd5 | Add AzureServiceBusContainer | - Implements new Service Bus Container
- Adds new test case for Service Bus
- Updates the Azure documentation
Relates to: https://github.com/testcontainers/testcontainers-java/discussions/9607#discussioncomment-11525985
<!--
Thanks for contributing to Testcontainers. Please review the following notes before
sub... | diff --git a/docs/modules/azure.md b/docs/modules/azure.md
index 19c141c7639..49f7b616b9b 100644
--- a/docs/modules/azure.md
+++ b/docs/modules/azure.md
@@ -5,11 +5,12 @@ This module is INCUBATING. While it is ready for use and operational in the curr
Testcontainers module for the Microsoft Azure's [SDK](https://git... | 5 | 4 | 1 | [{"id": "G0", "claim": "The container's constructor should accept only the image (a String or DockerImageName); the dependency on the SQL Server container should be declared through the API (e.g. dependsOn) rather than passed as a second constructor argument.", "category": "design", "verdict": "supported", "priority": ... | null |
testdouble__quibble__96 | testdouble/quibble | 96 | defect | 7bc7cbd0951e8f47b659b4f97a83292e9c330591 | d69a2fa920bc906b692d8d00a6f835d406de425f | Support node 20 | Fixes #95
Node.js 20 moved the loaders off the main thread, to their own thread. Usually this is not a problem for loaders, but `quibble` has an API that communicates with the loader itself. In versions prior to 20, this communication was done using global variables, but since the loaders are in a separate worker/th... | diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
index 051d036..cf13308 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node.js.yml
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
- node-version: [14.x, 16.x, 18.x]
+ node-version: [16.x, 18.x, 20.x]
... | 4 | 3 | 1 | [{"id": "G0", "claim": "lib/quibble.mjs was rewritten in a double-quoted, semicolon-laden style, and since quibble uses StandardJS it should keep single quotes and no semicolons.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "An accidental stray... | null |
testground__testground__1009 | testground/testground | 1,009 | defect | 80da8ee65826c00a84fdbde811faa253d3013d80 | 36d0f6ff9644ece98abe321f40529304dd4dffaf | `docker` package tests | Implements a few (but not all) tests for pkg/docker
More will need to be added later, particularly for the docker manager.
partial fix: https://github.com/testground/testground/issues/1005
| diff --git a/pkg/docker/docker_test.go b/pkg/docker/docker_test.go
new file mode 100644
index 000000000..705146dc3
--- /dev/null
+++ b/pkg/docker/docker_test.go
@@ -0,0 +1,235 @@
+package docker_test
+
+import (
+ "context"
+ "fmt"
+ "io/ioutil"
+ "math/rand"
+ "os"
+ "path/filepath"
+ "strconv"
+ "strings"
+ "testing"... | 7 | 5 | 0 | [{"id": "G0", "claim": "The PR should not carry these docker unit tests at all, because their carry cost is probably higher than the value they bring, and a few integration tests with proper test plans hitting these APIs would be preferable.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "in... | null |
testground__testground__1015 | testground/testground | 1,015 | defect | 80da8ee65826c00a84fdbde811faa253d3013d80 | 482fb3ba0af06d32fd20508ee0742ed94411b7d5 | `rpc` package tests | Separated out the rpctest component from https://github.com/testground/testground/pull/1009 since there was question about the usefulness of the docker test and this part is unrelated.
Fix: https://github.com/testground/testground/issues/1004 | diff --git a/pkg/rpc/rpc_test.go b/pkg/rpc/rpc_test.go
new file mode 100644
index 000000000..0819c8529
--- /dev/null
+++ b/pkg/rpc/rpc_test.go
@@ -0,0 +1,129 @@
+package rpc_test
+
+import (
+ "encoding/json"
+ "io/ioutil"
+ "reflect"
+ "testing"
+
+ "github.com/testground/testground/pkg/rpc"
+ "github.com/testground/t... | 7 | 6 | 1 | [{"id": "G0", "claim": "The separate rpctest package is redundant and the helper should just live in the test file.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The parameter name req_id should use mixed caps (reqID) per Effective Go.", "category": "ma... | null |
testground__testground__1108 | testground/testground | 1,108 | defect | 9852e56c5656b0d1f53a9e3d26c3f335c16297f0 | 5412a282098e1d8cac606569acfd0d94b0f4e17c | feat: detect redis port collision on local:exec | This closes #959 by adding a healthcheck rule to `local:exec` that fails if the default redis port is unavailable, aborting the healthchecker.
I wasn't sure if we should abort or just fail because just failing the healthchecker would give the user a warning and not much information. This way it is clearer that local... | diff --git a/pkg/healthcheck/checkers.go b/pkg/healthcheck/checkers.go
index a891ec840..c0346ff2a 100644
--- a/pkg/healthcheck/checkers.go
+++ b/pkg/healthcheck/checkers.go
@@ -118,6 +118,19 @@ func CheckK8sPods(ctx context.Context, client *kubernetes.Clientset, label strin
}
}
+// CheckRedisPort returns a checker... | 4 | 3 | 2 | [{"id": "G0", "claim": "The NotFixable placeholder fixer should be renamed to RequiresManualFixing and its error message changed accordingly, to give the user a next suggested action for better UX.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Test Test... | null |
testground__testground__249 | testground/testground | 249 | defect | 27aaf5893d847e138c507297a83d0e898e14bd40 | 78b1087c2995d0349054ed2742e11202a8621b4d | feat: return non-0 code on failure and streamline server response format | Streamlines all server responses to one format and correctly handles the errors on the client side. This fixes #241. | diff --git a/cmd/list.go b/cmd/list.go
index ffc6e6f0b..5e489be30 100644
--- a/cmd/list.go
+++ b/cmd/list.go
@@ -1,7 +1,6 @@
package cmd
import (
- "bufio"
"context"
"fmt"
@@ -31,12 +30,7 @@ func listCommand(ctx *cli.Context) error {
}
defer resp.Close()
- scanner := bufio.NewScanner(resp)
- for scanner... | 1 | 1 | 0 | [{"id": "G0", "claim": "The response-processing helpers in pkg/daemon/client/client.go should be named with `parse` instead of `process` (e.g. rename ProcessBuildResponse to ParseBuildResponse).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
testground__testground__271 | testground/testground | 271 | defect | bb4f4af4d1348620e51801fb872b38a56a157c6a | d8d563cb01cd19af0aca8a78121befc07c08e3e7 | Sidecar: add method to set IP addresses | * Make it possible to set IP addresses with the sidecar (docker only, may not work in swarm?).
* Document the sidecar.
* Use a consistent subnet for the control network.
* Test the sidecar.
TODO:
* [x] Testing:
* [x] Local docker - tested locally but I need to add an automated test.
* [ ] Docker swarm - ... | diff --git a/docs/NETWORKING.md b/docs/NETWORKING.md
new file mode 100644
index 000000000..e02a09d89
--- /dev/null
+++ b/docs/NETWORKING.md
@@ -0,0 +1,36 @@
+# Networking
+
+All testground runners _except_ for the local runner have two networks: a
+control and a data network.
+
+* Test instances communicate with each o... | 9 | 6 | 2 | [{"id": "G0", "claim": "The PR author is unsure whether the new WaitNetworkInitialized helper belongs in sdk/sync/helper.go.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The control and data subnet IP ranges are hard-coded in pkg/runner/common.go, and ... | null |
testing-library__dom-testing-library__106 | testing-library/dom-testing-library | 106 | defect | cbbda90762f9b5c97471841b0d00f05ddfe772ba | c67f95e552e1ed3c794a6d3c121fc9576f194711 | feat(queryBySelectText): add get/query by select text | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index ebb53535..c714d8d3 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -324,6 +324,18 @@
"code",
"doc"
]
+ },
+ {
+ "login": "matchai",
+ "name": "Matan Kushner",
+ "avatar_url": "https://avatars0.github... | 1 | 1 | 0 | [{"id": "G0", "claim": "In the new test fixture the option values do not match their labels — BMW and Toyota carry value=\"volvo\" and Honda carries value=\"audi\" — leaving the test data inconsistent and confusing.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__1116 | testing-library/dom-testing-library | 1,116 | defect | d578c7ea285d16609a09a96081055a49997938bc | df69c33a875ccec3944a90b20fea0a4df4eba78b | fix: reset regexg to prevent regexg with global flags to not match every element | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/matches.js b/src/__tests__/matches.js
index 3d512e659..69f4fec92 100644
--- a/src/__tests__/matches.js
+++ b/src/__tests__/matches.js
@@ -15,6 +15,14 @@ test('matchers accept regex', () => {
expect(fuzzyMatches('ABC', node, /ABC/, normalizer)).toBe(true)
})
+// https://stackoverflow.com... | 4 | 3 | 2 | [{"id": "G0", "claim": "The change to test regexes via new RegExp(matcher) needs test cases covering all regex flags, unless the existing tests already cover every flag.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Instead of recreating the regexp, th... | null |
testing-library__dom-testing-library__1120 | testing-library/dom-testing-library | 1,120 | defect | 6b99a7eca1f00ee5415ec3f007b67b6ccc9d4e94 | 3bca02830e4e2945e095e8e93dd5121e2683df76 | feat(byRole): Add description filter | **What**:
Add a new `description` option to `ByRole` queries.
This helps finding elements which are aria described.
**Why**:
We were implementing a React component to display the usual popup notifications and, when reading about accessibility considerations, we found we should use `ariadialog` role and we als... | diff --git a/src/__tests__/role.js b/src/__tests__/role.js
index a87bc000..38fc2af1 100644
--- a/src/__tests__/role.js
+++ b/src/__tests__/role.js
@@ -572,3 +572,177 @@ test('should find the input using type property instead of attribute', () => {
const {getByRole} = render('<input type="124">')
expect(getByRole(... | 5 | 3 | 1 | [{"id": "G0", "claim": "The new `description` option needs documentation under the Options section of byrole.mdx in testing-library-docs before this PR can be merged.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `name` option's documentation... | null |
testing-library__dom-testing-library__118 | testing-library/dom-testing-library | 118 | defect | 7b57f7313c3e751ad10e7ac8198ccc9b381cf82f | ba4a70e09eb5178c8a5be60cd97736299f8b759d | waitForDomChange Implementation | **What**:
waitForDomChange is implemented along with tests, documentation, and types.
waitForElement is changed to require a callback function
**Why**:
Resolves issue number #111
**How**:
I copied much of what was in waitForElement. They are very similar
**Checklist**:
- [x] Documentation
- [x] Tests
-... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index c714d8d3..d7f46755 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -336,6 +336,16 @@
"ideas",
"test"
]
+ },
+ {
+ "login": "themostcolm",
+ "name": "Alex Wendte",
+ "avatar_url": "https://avatars2.gi... | 15 | 13 | 1 | [{"id": "G0", "claim": "The getNodeText entry in the README table of contents should be indented one level less because it is independent of fireEvent.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tests assert the success handler is called w... | null |
testing-library__dom-testing-library__1205 | testing-library/dom-testing-library | 1,205 | defect | 9f363afe6ba6b2ec9d9d11d51e3c37ab72d4576b | fd299118cd7a720cff450d4bece4ee63c21b6a78 | feat: add offline/online events | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/events.js b/src/__tests__/events.js
index 8f8ea5635..20d01b0da 100644
--- a/src/__tests__/events.js
+++ b/src/__tests__/events.js
@@ -76,6 +76,11 @@ const eventTypes = [
events: ['load', 'error'],
elementType: 'img',
},
+ {
+ type: '',
+ events: ['offline', 'online'],
+ ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add the new offline/online events to `types/events.d.ts` as well.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testing-library__dom-testing-library__121 | testing-library/dom-testing-library | 121 | defect | 7b57f7313c3e751ad10e7ac8198ccc9b381cf82f | 4cdef38847be6169c1cd9fd006d6d8dfc06a1ca9 | feat(labels): add support for aria-labelledby | Fixes #120
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions i... | diff --git a/.size-snapshot.json b/.size-snapshot.json
index 094d20cb5..6809ec22c 100644
--- a/.size-snapshot.json
+++ b/.size-snapshot.json
@@ -1,7 +1,7 @@
{
"dist/dom-testing-library.umd.js": {
- "bundled": 115443,
- "minified": 50960,
- "gzipped": 15294
+ "bundled": 141515,
+ "minified": 56236,
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Drop the lodash.uniq dependency and deduplicate the label elements with a native Set instead: Array.from(new Set([...labelledElements, ...ariaLabelledElements])).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__1319 | testing-library/dom-testing-library | 1,319 | defect | 77448ba415e34f9a122746fe678a07d344d8456f | 73ecce55d38482257f5544b32104fd9e4592cdb2 | feat: Support anonymous custom elements when pretty printing DOM | Fixes https://github.com/testing-library/dom-testing-library/issues/1191 | diff --git a/src/DOMElementFilter.ts b/src/DOMElementFilter.ts
index bf5ff686..c83c6345 100644
--- a/src/DOMElementFilter.ts
+++ b/src/DOMElementFilter.ts
@@ -175,7 +175,7 @@ const testNode = (val: any) => {
}
export const test: NewPlugin['test'] = (val: any) =>
- val?.constructor?.name && testNode(val)
+ val?.co... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a test illustrating the intended behavior of the change (pretty-printing support for anonymous custom elements).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testing-library__dom-testing-library__169 | testing-library/dom-testing-library | 169 | defect | 8ca67fed0813ccbbab16290d9e29a77b0174333d | 4ae8c952359a571fa6fa4c9595b06654071fdfae | feat(queryByCurrentValue) | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index af5e7a10f..f43716264 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -565,4 +565,19 @@ test('getByText ignores script tags by default', () => {
expect(getAllByText(/hello/i, {ignore: false})... | 6 | 5 | 1 | [{"id": "G0", "claim": "Move the queryByCurrentValue and queryAllByCurrentValue exports down two lines so that the query and get pairs are grouped together.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "queryAllByCurrentValue's node.value looku... | null |
testing-library__dom-testing-library__172 | testing-library/dom-testing-library | 172 | defect | 8ca67fed0813ccbbab16290d9e29a77b0174333d | abd75dcef475bdf7d775a3443c503f1e02e87265 | feat(custom normalizer): allow custom control of normalization | **What**:
(PR for issue #171)
Adds an optional {normalizer} option to query functions; this
is a transformation function run over candidate match text
after it has had `trim` or `collapseWhitespace` run on it,
but before any matching text/function/regexp is tested
against it.
The use case is for tidying up... | diff --git a/README.md b/README.md
index fd22e28a5..4a976df9b 100644
--- a/README.md
+++ b/README.md
@@ -209,6 +209,7 @@ getByLabelText(
exact?: boolean = true,
collapseWhitespace?: boolean = true,
trim?: boolean = true,
+ normalizer?: NormalizerFn,
}): HTMLElement
```
@@ -261,6 +262,7 @@ getByP... | 3 | 3 | 1 | [{"id": "G0", "claim": "Expand out the acronyms in the test comment (UCC -> Unicode Control Character) for readers unfamiliar with Unicode.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "collapseWhitespace and trim should be accomplished from with... | null |
testing-library__dom-testing-library__224 | testing-library/dom-testing-library | 224 | defect | 4427c85efa93d9fda46674b78ed39a46c8b7ec15 | b7b305619f4112a0be51237dba2fe054b5ca5d78 | feat(findBy*): adds findBy* query type allowing for async element queries | **What**: add findBy* query type
<!-- Why are these changes necessary? -->
**Why**: Closes #203
<!-- How were these changes implemented? -->
**How**: Created a simple `makeFinder` function and made a finder for every query type based on the getBy queries
<!-- Have you done all of these things? -->
**... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index f6c09bb6..70677e35 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -1,4 +1,3 @@
-import 'jest-dom/extend-expect'
import {configure} from '../config'
import {render, renderIntoDocument} from '... | 3 | 3 | 0 | [{"id": "G0", "claim": "Add an explanatory comment above makeFinder saying that it wraps the get query in an awaitable version that retries until a timeout.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rename firstResultOrNull to something like ... | null |
testing-library__dom-testing-library__28 | testing-library/dom-testing-library | 28 | defect | cfafd9aa820848fa76a46b55fd3fbfb93f05c93d | 60ed4a6fb3c84bc81105398a332bcba1a28432ed | Add queryAll/getAll methods | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 30601751..afd59591 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -117,6 +117,31 @@ test('get element by its alt text', () => {
expect(getByAltText(/fin.*nem.*poster$/i).src).toBe('/finding... | 4 | 4 | 2 | [{"id": "G0", "claim": "The pull request should have an *All* version for every query/get method for consistency, not just the alt-text and testid ones it started with.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The existing single-result methods sho... | null |
testing-library__dom-testing-library__285 | testing-library/dom-testing-library | 285 | defect | d8290347e017f78e6706702b4f867bb4c4b68afb | 608681d702ea830fc40c0499713860c7eff39efe | Getroles logroles | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/package.json b/package.json
index a4d0c6622..dda79a633 100644
--- a/package.json
+++ b/package.json
@@ -45,6 +45,7 @@
"@babel/runtime": "^7.4.5",
"@sheerun/mutationobserver-shim": "^0.3.2",
"aria-query": "3.0.0",
+ "lodash.merge": "^4.6.1",
"pretty-format": "^24.8.0",
"wait-for-... | 8 | 6 | 1 | [{"id": "G0", "claim": "The 'logRoles is a function' test is unnecessary because the other test already calls the function.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'getRoles is a function' test is unnecessary.", "category": "testing", "verdic... | null |
testing-library__dom-testing-library__31 | testing-library/dom-testing-library | 31 | defect | 7bab30924fe86452fe8c2a80294a6bb17b0fd72a | 8e8475f897508317d4afadecda3d3fb5483199f2 | Make fuzzy matching opt-in instead of default | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/README.md b/README.md
index cf790132e..e7cf7806a 100644
--- a/README.md
+++ b/README.md
@@ -72,18 +72,19 @@ when a real user uses it.
* [Installation](#installation)
* [Usage](#usage)
- * [`getByLabelText(container: HTMLElement, text: TextMatch, options: {selector: string = '*'}): HTMLElement`](#getby... | 5 | 4 | 0 | [{"id": "G0", "claim": "The two new exact-match query test cases in src/__tests__/element-queries.js could be improved by using jest-in-case.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The fourth argument to the matchers (fuzzyMatches/matches) shoul... | null |
testing-library__dom-testing-library__342 | testing-library/dom-testing-library | 342 | defect | e418614972cf2c7e0365a4125b3e787228e2c703 | 264c143f9cd8ff4c17177ecee0f7204bf5007279 | Upgrade wait-for-expect package | Related to https://github.com/TheBrainFamily/wait-for-expect/pull/20 | diff --git a/src/__tests__/wait-for-dom-change.js b/src/__tests__/wait-for-dom-change.js
index 39487672..12e75ca7 100644
--- a/src/__tests__/wait-for-dom-change.js
+++ b/src/__tests__/wait-for-dom-change.js
@@ -1,6 +1,11 @@
import {waitForDomChange} from '../wait-for-dom-change'
import {renderIntoDocument} from './he... | 8 | 8 | 4 | [{"id": "G0", "claim": "Check whether the library's own wait* utilities (wait-for-element, wait-for-element-to-be-removed, wait-for-dom-change) need the same lazy-timer treatment as the upgraded wait-for-expect, and fix them if so.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_exi... | null |
testing-library__dom-testing-library__35 | testing-library/dom-testing-library | 35 | defect | cde0cdf273b249f51fc3b89aa4abc392cefc9b2e | b1ae0bc9dd8dfac8fa6256a5224403f77ad748d4 | get/query by value | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/README.md b/README.md
index 59650138..ca84035d 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,7 @@ when a real user uses it.
* [`getByText`](#getbytext)
* [`getByAltText`](#getbyalttext)
* [`getByTitle`](#getbytitle)
+ * [`getByValue`](#getbyvalue)
* [`getByTestId`](#getbytestid)
* [`w... | 1 | 1 | 0 | [{"id": "G0", "claim": "The 'query/get element by its value' test would be more straightforward if the value were present in the DOM from the start instead of being set afterwards with setAttribute, which is JSDOM's responsibility.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"... | null |
testing-library__dom-testing-library__365 | testing-library/dom-testing-library | 365 | defect | a401bb50c8301c27b2698d299b3ebc1483cc7633 | d8c1af148a62d06bec519066bf86f0b044688817 | fix: shouldExcludeFromA11yTree runs in IE11 | IE11 returns `undefined` for missing `parentElement`.
<!-- What changes are being made? (What feature/bug is being fixed here?) -->
fix: In IE11 when an element lacks `parentElement` it returns `undefined` instead of `null`.
<!-- Why are these changes necessary? -->
**Why**: Because otherwise you get these ... | diff --git a/src/role-helpers.js b/src/role-helpers.js
index 281e3e0c8..14bbe7358 100644
--- a/src/role-helpers.js
+++ b/src/role-helpers.js
@@ -26,7 +26,7 @@ function shouldExcludeFromA11yTree(element) {
let visibility = computedStyle.visibility
let currentElement = element
- while (currentElement !== null) {... | 3 | 2 | 1 | [{"id": "G0", "claim": "It might make more sense to throw if shouldExcludeFromA11yTree is passed a Node, since the accessibility tree is only specified for Element, and it is unclear why a Node is passed in the first place.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id... | null |
testing-library__dom-testing-library__367 | testing-library/dom-testing-library | 367 | defect | a401bb50c8301c27b2698d299b3ebc1483cc7633 | a2ee8c58ce4a3a9ef728f1467435d3366156acc1 | Add strict check for `dom` type | Hey,
I face an issue and come with this pr :)
**What**:
Add strict check for `dom`'s `outerHTML` field
**Why**:
To improve DX.
As a new user I've called `debug(x)` where `x` was a result of `queryAll*`. I've missed that `queryAll*` returns an array and got `TypeError: Cannot read property 'length' of... | diff --git a/src/pretty-dom.js b/src/pretty-dom.js
index 28f2cfcac..32f5d0bc4 100644
--- a/src/pretty-dom.js
+++ b/src/pretty-dom.js
@@ -25,6 +25,11 @@ function prettyDOM(
maxLength = getMaxLength(dom),
options,
) {
+ if (!(dom instanceof HTMLDocument) && !(dom instanceof HTMLElement)) {
+ throw new TypeErro... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new `instanceof HTMLDocument/HTMLElement` guard is too narrow — it would throw on svg elements and fails cross-realm `instanceof` — and the error message should not throw so many technicalities; checking for the presence of `outerHTML` with a plain 'Expected an element or document but got X'... | null |
testing-library__dom-testing-library__429 | testing-library/dom-testing-library | 429 | defect | a2c3472edad89c0701692fd516869b74db453014 | 1611b06a5dfb5d8608068082a1662b509a7fe7be | Add a debug method to screen. | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/screen.js b/src/__tests__/screen.js
index b1dc5c7c..9268617a 100644
--- a/src/__tests__/screen.js
+++ b/src/__tests__/screen.js
@@ -1,9 +1,63 @@
import {renderIntoDocument} from './helpers/test-utils'
import {screen} from '..'
+beforeEach(() => {
+ jest.spyOn(console, 'log').mockImplemen... | 3 | 2 | 0 | [{"id": "G0", "claim": "The PR author asks for direction on adding TypeScript type definitions for the new screen.debug method, since the change adds the method without any types.", "category": "types", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The assertion `expect(screen... | null |
testing-library__dom-testing-library__446 | testing-library/dom-testing-library | 446 | defect | 1ee3e7a8bf93c99d366276a822c13e3470e10f65 | 767f867db18506201fc065d163627c2fbfcf83ae | fix: Various implicit roles in ByRole | With #408 we'll be able to correctly identify some of these implicit roles (e.g. `<form>` or `<section>`)
**What**:
Fix various issues with implicit roles
**Why**:
Examples for elements with the wrong implicit role when using `aria-query@3`:
- `<form>` without an accessible name having a role (though even... | diff --git a/package.json b/package.json
index 87f2a3146..d0da5b418 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"@babel/runtime": "^7.6.2",
"@sheerun/mutationobserver-shim": "^0.3.2",
"@types/testing-library__dom": "^6.0.0",
- "aria-query": "3.0.0",
+ "aria-query": "^4.0.1",
... | 3 | 1 | 1 | [{"id": "G0", "claim": "The aria-query update appears to have removed the unnamed section's and form's `region`/`form` roles from the logRoles snapshot output, which may be a bug.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The change is breaking... | null |
testing-library__dom-testing-library__452 | testing-library/dom-testing-library | 452 | defect | cf57dcdcdb65591792d51b97f6391792ac9cabdd | a8362cbafdb539dd367c7596dfba23e849e79c7a | feat(config): add customGetElementError config option | Closes #360
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions i... | diff --git a/src/__tests__/__snapshots__/get-by-errors.js.snap b/src/__tests__/__snapshots__/get-by-errors.js.snap
new file mode 100644
index 000000000..42d166850
--- /dev/null
+++ b/src/__tests__/__snapshots__/get-by-errors.js.snap
@@ -0,0 +1,153 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`getAllByAltTe... | 7 | 5 | 1 | [{"id": "G0", "claim": "The tests should derive the list of get queries from the exported queries object (e.g. Object.keys(queries).filter(q => q.startsWith('get'))) instead of hardcoding GET_BY_QUERIES/GET_ALL_BY_QUERIES arrays that must be maintained by hand.", "category": "maintainability", "verdict": "supported", "... | null |
testing-library__dom-testing-library__496 | testing-library/dom-testing-library | 496 | defect | e75ae01df425921390e5d212745229f2311729b2 | 632cf768d2b13dcbcb8e6564537da9a09670cf93 | fix(fireEvent): Set composed property on relevant synthetic events | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/events.js b/src/__tests__/events.js
index fdf780832..7e5a7ecdd 100644
--- a/src/__tests__/events.js
+++ b/src/__tests__/events.js
@@ -3,7 +3,7 @@ import {fireEvent} from '..'
const eventTypes = [
{
type: 'Clipboard',
- events: ['copy', 'paste'],
+ events: ['copy', 'cut', 'paste... | 4 | 3 | 0 | [{"id": "G0", "claim": "The allEvents reduce in the tests could be simplified with flatMap to a single expression.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The eventMap should live in a separate shared file that both events.js and the test... | null |
testing-library__dom-testing-library__510 | testing-library/dom-testing-library | 510 | defect | 7741721f6dfe1e34ebf283e18189c9e2f2de5298 | d1059c8e6e615f8e92d2f92701ea070316f86028 | fix: queryHelpers.getElementError is not a function | **What**:
If you try to call getElementError in a custom query according to the documentation, you will get an error.
<!-- Why are these changes necessary? -->
**Why**:
getElementError was removed in #452.
<!-- How were these changes implemented? -->
**How**:
redefine to queryHelpers
<!-- Have you don... | diff --git a/src/__tests__/query-helper.js b/src/__tests__/query-helper.js
new file mode 100644
index 00000000..7e53ab03
--- /dev/null
+++ b/src/__tests__/query-helper.js
@@ -0,0 +1,18 @@
+import * as queryHelpers from '../query-helpers'
+import {configure, getConfig} from '../config'
+
+const originalConfig = getConfi... | 1 | 1 | 0 | [{"id": "G0", "claim": "getMultipleElementsFoundError should call the newly added getElementError helper instead of getConfig().getElementError directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__542 | testing-library/dom-testing-library | 542 | defect | 9007a673a138a50becd764c58d08c28477bcfc33 | 18dd4ba68587776a5fa4c3a687b160f955a11104 | Improve error stack traces for async errors | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/wait-for.js b/src/__tests__/wait-for.js
index 4ba4702df..f7595c87e 100644
--- a/src/__tests__/wait-for.js
+++ b/src/__tests__/wait-for.js
@@ -34,6 +34,17 @@ test('uses generic error if there was no last error', async () => {
expect(result).toMatchInlineSnapshot(`[Error: Timed out in waitFo... | 4 | 4 | 3 | [{"id": "G0", "claim": "The new stack-trace replacement behaviour should be enabled based on a config parameter — a showOriginalStackTrace property added to src/config.js and used in wait-for.js — instead of being applied unconditionally.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "intro... | null |
testing-library__dom-testing-library__641 | testing-library/dom-testing-library | 641 | defect | 52efb3bef22e6a09735b25fcfaa79f8c554f2e14 | 31558900bae4ab564364684d368182d12bebd46d | fix(userEvent): don't select option if select is disabled | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/user-event/__tests__/select-options.js b/src/user-event/__tests__/select-options.js
index db1ca6be..4b512329 100644
--- a/src/user-event/__tests__/select-options.js
+++ b/src/user-event/__tests__/select-options.js
@@ -107,3 +107,19 @@ test('throws an error if multiple are passed but not a multiple sele... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new disabled-select test should use the shared setupSelect helper like the other tests and verify that no events are fired when the select is disabled.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__649 | testing-library/dom-testing-library | 649 | defect | 446cce81652405c737bf6ff75f6bfd2f569a2894 | 5deca18d9d5ee6005259c71769dfc4f5189c51ee | fix: runWithRealTimers to be compatible with new version of jest | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/helpers.js b/src/__tests__/helpers.js
index 83d45052..c9ede524 100644
--- a/src/__tests__/helpers.js
+++ b/src/__tests__/helpers.js
@@ -1,4 +1,11 @@
-import {getDocument, getWindowFromNode, checkContainerType} from '../helpers'
+import {
+ getDocument,
+ getWindowFromNode,
+ checkContainer... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new fake-timers tests need an afterEach that calls jest.useRealTimers() to keep the tests isolated.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testing-library__dom-testing-library__664 | testing-library/dom-testing-library | 664 | defect | a114f4fd958619890880f58496438c00f4288f84 | 0120a91d7a97171fb51858f6cd859f9db0e6ddcf | fix: Don't recommend ByRole if role is `generic` | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 05aade0c..8a38fa11 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -533,14 +533,14 @@ test('queryAllByRole returns semantic html elements', () => {
expect(queryAllByRole(/listitem/i)).toHave... | 1 | 1 | 0 | [{"id": "G0", "claim": "The TODO comments anticipating aria-query PR #42 (at element-queries.js lines 534-535 and 541-542) can now be removed, since this PR's updated expected counts match the values they anticipated.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__67 | testing-library/dom-testing-library | 67 | defect | 256f8994a65351209b95760871397c5b7625ef8b | 38b0326b9592a32620215a66e4414672c8c78795 | feat(queries): allow overriding queries in getQueriesForElement | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/get-queries-for-element.js b/src/__tests__/get-queries-for-element.js
new file mode 100644
index 00000000..889f154f
--- /dev/null
+++ b/src/__tests__/get-queries-for-element.js
@@ -0,0 +1,43 @@
+import {getQueriesForElement} from '../get-queries-for-element'
+import {queries} from '..'
+
+tes... | 1 | 1 | 0 | [{"id": "G0", "claim": "The array-merging logic should be removed from getQueriesForElement; callers who want to merge the built-in queries can do that themselves when calling the function.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
testing-library__dom-testing-library__678 | testing-library/dom-testing-library | 678 | defect | 373dbc400689f4c9c987192b6ecf85b0f7de2e31 | 1809549e0ebd5c9a29447b18ebd97bf409847382 | Lists elements that matched multiple error | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/queries/role.js b/src/queries/role.js
index 07fe0771..4f388106 100644
--- a/src/queries/role.js
+++ b/src/queries/role.js
@@ -9,6 +9,7 @@ import {
} from '../role-helpers'
import {wrapAllByQueryWithSuggestion} from '../query-helpers'
import {checkContainerType} from '../helpers'
+import {prettyDOM} ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Changing getMultipleError's signature from (container, ...args) to ({container, elements}, ...args) is a breaking change, and the maintainer asks for a backwards-compatible way to improve the error message, deferring the API change to the next major version.", "category": "design", "verdict": "s... | null |
testing-library__dom-testing-library__681 | testing-library/dom-testing-library | 681 | defect | 9ae92446762c15259e18ea3a398ddd8cb7afbc97 | 732a8abf5560b13cfba976f5f801048e7018e2d4 | get by label concat values | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 8f2695cbc..c5297c067 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -168,6 +168,12 @@ test('can get form controls by label text', () => {
<label id="fifth-label-two">5th two</label>
... | 3 | 3 | 1 | [{"id": "G0", "claim": "The '// See note below.' comment on the copy line refers to no note, and the inner for loop over copy appears to run only once, so the reviewer asks whether a loop is needed there.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
testing-library__dom-testing-library__718 | testing-library/dom-testing-library | 718 | defect | f854cde7cef103c939c40f3b56c11543604ce627 | accbf230fd5b9159c458753146945a4cddcbbd40 | Added explicit error message for null or undefined matchers | <!-- What changes are being made? (What feature/bug is being fixed here?) -->
**What**:
Added a nice explicit error message for the case in #717 of `null` or `undefined` as a `matcher`.
**Why**:
Better error messages = happier users! 💝
**How**:
<!-- Have you done all of these things? -->
**Checkl... | diff --git a/src/__tests__/matches.js b/src/__tests__/matches.js
index 5e4d7243..9be46a6b 100644
--- a/src/__tests__/matches.js
+++ b/src/__tests__/matches.js
@@ -26,3 +26,16 @@ test('matchers return false if text to match is not a string', () => {
expect(matches(null, node, 'ABC', normalizer)).toBe(false)
expect... | 2 | 2 | 0 | [{"id": "G0", "claim": "The wording of the thrown error message (\"It looks like you passed null instead of a matcher\") could be aggravating for someone struggling, and should use more neutral phrasing while keeping the original grammar.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope":... | null |
testing-library__dom-testing-library__726 | testing-library/dom-testing-library | 726 | defect | 54aebf7ae2d70b8b4a187e44a31360bc8a130826 | 664d9808712aa3ba8a8b5b0e1756836a23312f0d | fix(ByLabelText): support IE and other legacy browsers | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 61a88acf..255d2ae9 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -1182,3 +1182,65 @@ test('return a proper error message when no label is found and there is an aria-
</div>"
`)
})
+
+// ht... | 3 | 3 | 1 | [{"id": "G0", "claim": "Mocking HTMLInputElement.prototype.labels inside the test without a guaranteed restore leaks the mock to other tests; instead jest.restoreAllMocks should be added to the tests setup.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
testing-library__dom-testing-library__745 | testing-library/dom-testing-library | 745 | defect | fe04b503df13be9207769b5d61d67c5532e24636 | c396a3091f98c1431ca39923863e1692d278bf59 | fix: suggest hidden:true with getByRole if element is inaccessible |
<!-- What changes are being made? (What feature/bug is being fixed here?) -->
**What**: If an element is inaccessible `getSuggestedQuery` should suggest to use `hidden:true` with `getByRole`
<!-- Why are these changes necessary? -->
**Why**: Answering to this issue https://github.com/testing-library/dom-tes... | diff --git a/src/__tests__/suggestions.js b/src/__tests__/suggestions.js
index e291063d..c6cd0025 100644
--- a/src/__tests__/suggestions.js
+++ b/src/__tests__/suggestions.js
@@ -549,3 +549,18 @@ test('should get the first label with aria-labelledby contains multiple ids', ()
variant: 'get',
})
})
+
+test('sho... | 2 | 2 | 1 | [{"id": "G0", "claim": "The suggestion should not just recommend the hidden:true option but also state that the element is not part of the accessibility tree (equivalent to being invisible for a sighted user), because explicitly recommending aria-hidden may lead people to add it randomly.", "category": "design", "verdi... | null |
testing-library__dom-testing-library__789 | testing-library/dom-testing-library | 789 | defect | 53829b8651bcea86410de73eeb81751b0f2ccae6 | e437ffc379dff7fdba060e7bfadf74a81ecf785c | fix: getByLabelText for output | **What**: I have fixed #787 and the comment in https://github.com/testing-library/dom-testing-library/issues/343#issuecomment-555385756
<!-- Why are these changes necessary? -->
**Why**: Because following specs it should be possible to get `output` by it's label.
**How**: Instead of replacing string that ... | diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 2202068b0..bb610308f 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -293,7 +293,7 @@ test('returns the labelable element control inside a label', () => {
<output />
<progress />
... | 4 | 4 | 2 | [{"id": "G0", "claim": "The membership test could be written more clearly as labelledNodeNames.includes(node.nodeName.toLowerCase()) instead of labelledNodeNames.some(...).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Only label elements go th... | null |
testing-library__dom-testing-library__790 | testing-library/dom-testing-library | 790 | defect | 53829b8651bcea86410de73eeb81751b0f2ccae6 | f9f103a0c006e77d1d62589819194e79e4382a9f | refactor: export label helpers to his own file and use both in suggestions and query |
**What**: Moved label helpers to his own file
**Why**: suggestions was using his logic to get label content that was not working with `aria-labelledby`
**How**: Using the logic implemented by @delca85 both for suggestions and label query
**Checklist**:
<!-- add "N/A" to the end of each line that's irrelev... | diff --git a/src/label-helpers.js b/src/label-helpers.js
new file mode 100644
index 000000000..c13e1dd32
--- /dev/null
+++ b/src/label-helpers.js
@@ -0,0 +1,55 @@
+function getLabelContent(label) {
+ let labelContent = label.getAttribute('value') || label.textContent
+ Array.from(label.querySelectorAll('textarea')).f... | 2 | 2 | 1 | [{"id": "G0", "claim": "The rewrite of the label-text computation in getSuggestedQuery looks like a change from the original behavior (all label contents joined with a space instead of the previous first-label-only lookup) — is it a bug fix or a new feature? — and it should probably have a test.", "category": "testing"... | null |
testing-library__dom-testing-library__86 | testing-library/dom-testing-library | 86 | defect | 19c28682dd6beff303e80410a4c3593a808f57b1 | 443bed2551020f5ae6e7920f0e4a188a04ef861b | Add ability to select `title` element of SVG with `getByTitle` | Close #83
**What**: Add ability to select `title` element of SVG with `getByTitle`
**Why**: The `title` element of an SVG behaves the same as a `title` attribute on other elements, so the `getByTitle` query should find that element.
**How**: Update `queryAllByTitle` function to check for `[title]` or `svg > ti... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index f7ffca0b..a616a493 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -296,6 +296,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "wyze",
+ "name": "Neil Kistner",
+ "avatar_url": "https://avatars1.... | 1 | 1 | 1 | [{"id": "G0", "claim": "The PR's rewritten title query leaves its non-exact matching path untested, so one more assertion specifying `exact: false` should be added to cover it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
testing-library__dom-testing-library__906 | testing-library/dom-testing-library | 906 | defect | f7b5c33c44632fba1579cb44f9f175be1ec46087 | d1222c1789e6908e9418bdb1b218a3417dd2579c | feat: Improve error message when passing an Array while a single Element is expected | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/src/__tests__/helpers.js b/src/__tests__/helpers.js
index 8e5d436f..66732023 100644
--- a/src/__tests__/helpers.js
+++ b/src/__tests__/helpers.js
@@ -17,6 +17,11 @@ describe('window retrieval throws when given something other than a node', () =>
`"It looks like you passed a Promise object instead of... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new array guard should use Array.isArray(node) instead of `node instanceof Array`, which fails for arrays from other realms (e.g. iframes).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The error message should drop the ... | null |
testing-library__dom-testing-library__907 | testing-library/dom-testing-library | 907 | defect | a25149d6ad2cc34401fac3c2c350bbf8c51f844d | 3f6bedbd72c7fa925de97a828a071bbe9e05b2d9 | feat: Add `filterNode` option to `prettyDOM` | BREAKING CHANGE: `<script />`, `<style />` and comment nodes are now ignored by default in `prettyDOM` .If you whish to return to the old behavior, use a custom `filterNode` function. In this case `prettyDOM(element, { filterNode: () => true })`.
I would find this change useful. But I believe this is possible to do ... | diff --git a/src/DOMElementFilter.ts b/src/DOMElementFilter.ts
new file mode 100644
index 000000000..33a627201
--- /dev/null
+++ b/src/DOMElementFilter.ts
@@ -0,0 +1,259 @@
+/**
+ * Source: https://github.com/facebook/jest/blob/master/packages/pretty-format/src/plugins/DOMElement.ts
+ */
+import type {Config, NewPlugin... | 7 | 3 | 1 | [{"id": "G0", "claim": "The change is breaking and should be considered thoroughly, e.g. by hiding the new behaviour behind a configuration option whose default is only flipped to true on a major release.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
testing-library__dom-testing-library__94 | testing-library/dom-testing-library | 94 | defect | 98c67e292bee26901f6ebb9a0bb8947d12a59805 | 97bd1e8d068d435878b053f23da917284cd0d9d1 | Feature - Add queries for dom attriburte `role` | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index ac7bafbc..ebb53535 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -314,6 +314,16 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "JeffBaumgardt",
+ "name": "Jeff Baumgardt",
+ "avatar_url": "https:... | 3 | 3 | 0 | [{"id": "G0", "claim": "Move the new `getByRole` documentation section above `getByTestId` so the README reads from most recommended to least, since `getByRole` should be preferred over `getByTestId` when it applies.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":... | null |
testing-library__dom-testing-library__943 | testing-library/dom-testing-library | 943 | defect | ffc8f26d48543de95c7fff4e5d961cc4beaa3872 | 77b903b9676338e6bb177f3225d680ca0c4b2537 | feat(ByRole): Allow filter by `aria-current` state | According to fix #864 issue, this PR adds `aria-current` attribute to byRole queries options.
Since `aria-current` may be used in different ways e.g aria-current="page", aria-current="location", aria-current="step" we may consider making the option take a string like:
getByRole("button", { current: "page" })
b... | diff --git a/src/__tests__/ariaAttributes.js b/src/__tests__/ariaAttributes.js
index 843342300..639c42adb 100644
--- a/src/__tests__/ariaAttributes.js
+++ b/src/__tests__/ariaAttributes.js
@@ -1,5 +1,7 @@
import {render, renderIntoDocument} from './helpers/test-utils'
+import {ariaCurrentValues} from '../role-helper... | 4 | 3 | 2 | [{"id": "G0", "claim": "The `current` option should query against exact `aria-current` values instead of casting every value to a boolean, since it is unclear that `aria-current=\"page\"` and `aria-current=\"date\"` should both match `current: true`.", "category": "design", "verdict": "supported", "priority": "P1", "sc... | null |
testing-library__jest-dom__109 | testing-library/jest-dom | 109 | defect | b2b4bd3ba65c48b350194a7623797e70f8a1390e | f4ed7e741b5cdc02336b74c9f6a7331ee63e6970 | Add toBeRequired() method | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6b0ccf55..6e2977a6 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -247,6 +247,17 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "hiwelo",
+ "name": "hiwelo.",
+ "avatar_url": "https://avatars0.git... | 4 | 4 | 4 | [{"id": "G0", "claim": "The FORM_TAGS list is wrong because <option>, <optgroup> and <button> do not support the required attribute per MDN, and some <input> types do not support it either.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ARIA che... | null |
testing-library__jest-dom__110 | testing-library/jest-dom | 110 | defect | d3f5855b8c6e9194d7947fb8fda5f5d6282bbeb7 | fad66c4aea31f478032e67b15a35f0a784f1e657 | Implement `toBeInvalid` & `toBeValid` matchers | <!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contribu... | diff --git a/README.md b/README.md
index 9bf84230..e2940e9f 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,9 @@ to maintain.
- [`toBeEnabled`](#tobeenabled)
- [`toBeEmpty`](#tobeempty)
- [`toBeInTheDocument`](#tobeinthedocument)
+ - [`toBeInvalid`](#tobeinvalid)
- [`toBeRequired`](#toberequired)
+ - ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The README's `toBeInvalid` and `toBeValid` sections should link the `aria-invalid` attribute and `checkValidity()` to their official MDN documentation.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The jsdom `JSDOM` workar... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.