-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore]: use ErrorContains and EqualError #35483
Merged
djaglowski
merged 1 commit into
open-telemetry:main
from
mmorel-35:testify/error-contains
Sep 30, 2024
Merged
[chore]: use ErrorContains and EqualError #35483
djaglowski
merged 1 commit into
open-telemetry:main
from
mmorel-35:testify/error-contains
Sep 30, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
connector/count
connector/sum
exporter/clickhouse
exporter/kafka
exporter/loki
Loki Exporter
exporter/otelarrow
exporter/signalfx
exporter/splunkhec
extension/oauth2clientauth
extension/observer
internal/aws
internal/core
internal/docker
internal/kafka
pkg/ottl
pkg/sampling
pkg/stanza
processor/geoip
receiver/activedirectoryds
receiver/apachespark
receiver/awsxray
receiver/bigip
receiver/cloudflare
receiver/couchdb
receiver/dockerstats
receiver/elasticsearch
receiver/flinkmetrics
receiver/fluentforward
receiver/github
receiver/hostmetrics
labels
Sep 28, 2024
github-actions
bot
added
receiver/solace
receiver/statsd
statsd related issues
receiver/webhookevent
labels
Sep 28, 2024
mmorel-35
force-pushed
the
testify/error-contains
branch
from
September 28, 2024 12:03
04d17ea
to
5fa3cc5
Compare
Signed-off-by: Matthieu MOREL <[email protected]>
mmorel-35
force-pushed
the
testify/error-contains
branch
from
September 28, 2024 12:12
5fa3cc5
to
e14eb45
Compare
mmorel-35
requested review from
atoulme,
a team,
jmacd,
dmitryax,
djaglowski,
dashpole,
MovieStoreGuy,
andrzej-stencel,
crobert-1,
TylerHelmuth,
bogdandrutu,
evan-bradley and
jpkrohling
as code owners
September 28, 2024 12:16
atoulme
approved these changes
Sep 30, 2024
songy23
approved these changes
Sep 30, 2024
crobert-1
approved these changes
Sep 30, 2024
crobert-1
added
the
ready to merge
Code review completed; ready to merge by maintainers
label
Sep 30, 2024
jriguera
pushed a commit
to springernature/opentelemetry-collector-contrib
that referenced
this pull request
Oct 4, 2024
#### Description Testifylint doesn't support it yet. This replaces `Contains(t, err.Error()` by `ErrorContains(t, err` and `Equal(t, err.Error()` by `EqualError(t, err` As they both check for nil error it becomes useless to check it yourself without having defined a custom message <!-- Signed-off-by: Matthieu MOREL <[email protected]> --> Signed-off-by: Matthieu MOREL <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci-cd
CI, CD, testing, build issues
connector/count
connector/sum
exporter/clickhouse
exporter/kafka
exporter/loki
Loki Exporter
exporter/otelarrow
exporter/signalfx
exporter/splunkhec
extension/oauth2clientauth
extension/observer
internal/aws
internal/core
internal/docker
internal/kafka
pkg/ottl
pkg/sampling
pkg/stanza
processor/geoip
ready to merge
Code review completed; ready to merge by maintainers
receiver/activedirectoryds
receiver/apachespark
receiver/awsxray
receiver/bigip
receiver/cloudflare
receiver/couchdb
receiver/dockerstats
receiver/elasticsearch
receiver/flinkmetrics
receiver/fluentforward
receiver/github
receiver/hostmetrics
receiver/jmx
JMX Receiver
receiver/kafka
receiver/kafkametrics
receiver/mongodb
receiver/mongodbatlas
receiver/otelarrow
receiver/podman
receiver/prometheus
Prometheus receiver
receiver/rabbitmq
receiver/receivercreator
receiver/redis
Redis related issues
receiver/riak
receiver/saphana
receiver/snmp
receiver/snowflake
Snowflake receiver
receiver/solace
receiver/statsd
statsd related issues
receiver/webhookevent
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Testifylint doesn't support it yet.
This replaces
Contains(t, err.Error()
byErrorContains(t, err
andEqual(t, err.Error()
byEqualError(t, err
As they both check for nil error it becomes useless to check it yourself without having defined a custom message