Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5198127

Browse files
chore: bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (#19599)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify)from 1.10.0 to 1.11.1.<details><summary>Release notes</summary><p><em>Sourced from <ahref="https://github.com/stretchr/testify/releases">github.com/stretchr/testify'sreleases</a>.</em></p><blockquote><h2>v1.11.1</h2><p>This release fixes <ahref="https://redirect.github.com/stretchr/testify/issues/1785">#1785</a>introduced in v1.11.0 where expected argument values implementing thestringer interface (<code>String() string</code>) with a method whichmutates their value, when passed to mock.Mock.On(<code>m.On(&quot;Method&quot;, &lt;expected&gt;).Return()</code>) oractual argument values passed to mock.Mock.Called may no longer matchone another where they previously did match. The behaviour prior tov1.11.0 where the stringer is always called is restored. Future testifyreleases may not call the stringer method at all in this case.</p><h2>What's Changed</h2><ul><li>Backport <ahref="https://redirect.github.com/stretchr/testify/issues/1786">#1786</a>to release/1.11: mock: revert to pre-v1.11.0 argument matching behaviorfor mutating stringers by <ahref="https://github.com/brackendawson"><code>@​brackendawson</code></a>in <ahref="https://redirect.github.com/stretchr/testify/pull/1788">stretchr/testify#1788</a></li></ul><p><strong>Full Changelog</strong>: <ahref="https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1">https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1</a></p><h2>v1.11.0</h2><h2>What's Changed</h2><h3>Functional Changes</h3><p>v1.11.0 Includes a number of performance improvements.</p><ul><li>Call stack perf change for CallerInfo by <ahref="https://github.com/mikeauclair"><code>@​mikeauclair</code></a> in<ahref="https://redirect.github.com/stretchr/testify/pull/1614">stretchr/testify#1614</a></li><li>Lazily render mock diff output on successful match by <ahref="https://github.com/mikeauclair"><code>@​mikeauclair</code></a> in<ahref="https://redirect.github.com/stretchr/testify/pull/1615">stretchr/testify#1615</a></li><li>assert: check early in Eventually, EventuallyWithT, and Never by <ahref="https://github.com/cszczepaniak"><code>@​cszczepaniak</code></a>in <ahref="https://redirect.github.com/stretchr/testify/pull/1427">stretchr/testify#1427</a></li><li>assert: add IsNotType by <ahref="https://github.com/bartventer"><code>@​bartventer</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1730">stretchr/testify#1730</a></li><li>assert.JSONEq: shortcut if same strings by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1754">stretchr/testify#1754</a></li><li>assert.YAMLEq: shortcut if same strings by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1755">stretchr/testify#1755</a></li><li>assert: faster and simpler isEmpty using reflect.Value.IsZero by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1761">stretchr/testify#1761</a></li><li>suite: faster methods filtering (internal refactor) by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1758">stretchr/testify#1758</a></li></ul><h3>Fixes</h3><ul><li>assert.ErrorAs: log target type by <ahref="https://github.com/craig65535"><code>@​craig65535</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1345">stretchr/testify#1345</a></li><li>Fix failure message formatting for Positive and Negative asserts in<ahref="https://redirect.github.com/stretchr/testify/pull/1062">stretchr/testify#1062</a></li><li>Improve ErrorIs message when error is nil but an error was expectedby <a href="https://github.com/tsioftas"><code>@​tsioftas</code></a> in<ahref="https://redirect.github.com/stretchr/testify/pull/1681">stretchr/testify#1681</a></li><li>fix Subset/NotSubset when calling with mixed input types by <ahref="https://github.com/siliconbrain"><code>@​siliconbrain</code></a>in <ahref="https://redirect.github.com/stretchr/testify/pull/1729">stretchr/testify#1729</a></li><li>Improve ErrorAs failure message when error is nil by <ahref="https://github.com/ccoVeille"><code>@​ccoVeille</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1734">stretchr/testify#1734</a></li><li>mock.AssertNumberOfCalls: improve error msg by <ahref="https://github.com/3scalation"><code>@​3scalation</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1743">stretchr/testify#1743</a></li></ul><h3>Documentation, Build &amp; CI</h3><ul><li>docs: Fix typo in README by <ahref="https://github.com/alexandear"><code>@​alexandear</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1688">stretchr/testify#1688</a></li><li>Replace deprecated io/ioutil with io and os by <ahref="https://github.com/alexandear"><code>@​alexandear</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1684">stretchr/testify#1684</a></li><li>Document consequences of calling t.FailNow() by <ahref="https://github.com/greg0ire"><code>@​greg0ire</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1710">stretchr/testify#1710</a></li><li>chore: update docs for Unset <ahref="https://redirect.github.com/stretchr/testify/issues/1621">#1621</a>by <a href="https://github.com/techfg"><code>@​techfg</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1709">stretchr/testify#1709</a></li><li>README: apply gofmt to examples by <ahref="https://github.com/alexandear"><code>@​alexandear</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1687">stretchr/testify#1687</a></li><li>refactor: use %q and %T to simplify fmt.Sprintf by <ahref="https://github.com/alexandear"><code>@​alexandear</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1674">stretchr/testify#1674</a></li><li>Propose Christophe Colombier (ccoVeille) as approver by <ahref="https://github.com/brackendawson"><code>@​brackendawson</code></a>in <ahref="https://redirect.github.com/stretchr/testify/pull/1716">stretchr/testify#1716</a></li><li>Update documentation for the Error function in assert or requirepackage by <ahref="https://github.com/architagr"><code>@​architagr</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1675">stretchr/testify#1675</a></li><li>assert: remove deprecated build constraints by <ahref="https://github.com/alexandear"><code>@​alexandear</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1671">stretchr/testify#1671</a></li><li>assert: apply gofumpt to internal test suite by <ahref="https://github.com/ccoVeille"><code>@​ccoVeille</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1739">stretchr/testify#1739</a></li><li>CI: fix shebang in .ci.*.sh scripts by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1746">stretchr/testify#1746</a></li><li>assert,require: enable parallel testing on (almost) all top tests by<a href="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1747">stretchr/testify#1747</a></li><li>suite.Passed: add one more status test report by <ahref="https://github.com/Ararsa-Derese"><code>@​Ararsa-Derese</code></a>in <ahref="https://redirect.github.com/stretchr/testify/pull/1706">stretchr/testify#1706</a></li><li>Add Helper() method in internal mocks and assert.CollectT by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1423">stretchr/testify#1423</a></li><li>assert.Same/NotSame: improve usage of Sprintf by <ahref="https://github.com/ccoVeille"><code>@​ccoVeille</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1742">stretchr/testify#1742</a></li><li>mock: enable parallel testing on internal testsuite by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1756">stretchr/testify#1756</a></li><li>suite: cleanup use of 'testing' internals at runtime by <ahref="https://github.com/dolmen"><code>@​dolmen</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1751">stretchr/testify#1751</a></li><li>assert: check test failure message for Empty and NotEmpty by <ahref="https://github.com/ccoVeille"><code>@​ccoVeille</code></a> in <ahref="https://redirect.github.com/stretchr/testify/pull/1745">stretchr/testify#1745</a></li></ul><!-- raw HTML omitted --></blockquote><p>... (truncated)</p></details><details><summary>Commits</summary><ul><li><ahref="https://github.com/stretchr/testify/commit/2a57335dc9cd6833daa820bc94d9b40c26a7917d"><code>2a57335</code></a>Merge pull request <ahref="https://redirect.github.com/stretchr/testify/issues/1788">#1788</a>from brackendawson/1785-backport-1.11</li><li><ahref="https://github.com/stretchr/testify/commit/af8c91234f184009f57ef29027b39ca89cb00100"><code>af8c912</code></a>Backport <ahref="https://redirect.github.com/stretchr/testify/issues/1786">#1786</a>to release/1.11</li><li><ahref="https://github.com/stretchr/testify/commit/b7801fbf5cd58d201296d5d0e132d1849966dbd4"><code>b7801fb</code></a>Merge pull request <ahref="https://redirect.github.com/stretchr/testify/issues/1778">#1778</a>from stretchr/dependabot/github_actions/actions/chec...</li><li><ahref="https://github.com/stretchr/testify/commit/69831f3b08c40d56a09d0be93e9d5ae034f1590b"><code>69831f3</code></a>build(deps): bump actions/checkout from 4 to 5</li><li><ahref="https://github.com/stretchr/testify/commit/a53be35c3b0cfcd5189cffcfd75df60ea581104c"><code>a53be35</code></a>Improve captureTestingT helper</li><li><ahref="https://github.com/stretchr/testify/commit/aafb604176db7e1f2c9810bc90d644291d057687"><code>aafb604</code></a>mock: improve formatting of error message</li><li><ahref="https://github.com/stretchr/testify/commit/7218e0390acd2aea3edb18574110ec2753c0aeef"><code>7218e03</code></a>improve error msg</li><li><ahref="https://github.com/stretchr/testify/commit/929a2126c2702df436312656a0304580b526c6e9"><code>929a212</code></a>Merge pull request <ahref="https://redirect.github.com/stretchr/testify/issues/1758">#1758</a>from stretchr/dolmen/suite-faster-method-filtering</li><li><ahref="https://github.com/stretchr/testify/commit/bc7459ec38128532ff32f23cfab4ea0b725210f2"><code>bc7459e</code></a>suite: faster filtering of methods (-testify.m)</li><li><ahref="https://github.com/stretchr/testify/commit/7d37b5c962954410bcd7a71ff3a77c79514056d1"><code>7d37b5c</code></a>suite: refactor methodFilter</li><li>Additional commits viewable in <ahref="https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1">compareview</a></li></ul></details><br />[![Dependabot compatibilityscore](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.10.0&new-version=1.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)Dependabot will resolve any conflicts with this PR as long as you don'talter it yourself. You can also trigger a rebase manually by commenting`@dependabot rebase`.[//]: # (dependabot-automerge-start)[//]: # (dependabot-automerge-end)---<details><summary>Dependabot commands and options</summary><br />You can trigger Dependabot actions by commenting on this PR:- `@dependabot rebase` will rebase this PR- `@dependabot recreate` will recreate this PR, overwriting any editsthat have been made to it- `@dependabot merge` will merge this PR after your CI passes on it- `@dependabot squash and merge` will squash and merge this PR afteryour CI passes on it- `@dependabot cancel merge` will cancel a previously requested mergeand block automerging- `@dependabot reopen` will reopen this PR if it is closed- `@dependabot close` will close this PR and stop Dependabot recreatingit. You can achieve the same result by closing it manually- `@dependabot show <dependency name> ignore conditions` will show allof the ignore conditions of the specified dependency- `@dependabot ignore this major version` will close this PR and stopDependabot creating any more for this major version (unless you reopenthe PR or upgrade to it yourself)- `@dependabot ignore this minor version` will close this PR and stopDependabot creating any more for this minor version (unless you reopenthe PR or upgrade to it yourself)- `@dependabot ignore this dependency` will close this PR and stopDependabot creating any more for this dependency (unless you reopen thePR or upgrade to it yourself)</details>---------Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Co-authored-by: Ethan Dickson <ethan@coder.com>
1 parenta3b8176 commit5198127

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

‎coderd/metricscache/metricscache_test.go‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,19 @@ func TestCache_BuildTime(t *testing.T) {
261261
wantTransition:=codersdk.WorkspaceTransition(tt.args.transition)
262262
require.Eventuallyf(t,func()bool {
263263
stats:=cache.TemplateBuildTimeStats(template.ID)
264-
returnstats[wantTransition]!= codersdk.TransitionStats{}
264+
ts:=stats[wantTransition]
265+
returnts.P50!=nil&&*ts.P50==tt.want.buildTimeMs
265266
},testutil.WaitLong,testutil.IntervalMedium,
266-
"BuildTime neverpopulated",
267+
"P50 neverreached expected value for %v",wantTransition,
267268
)
268269

269-
gotStats=cache.TemplateBuildTimeStats(template.ID)
270-
fortransition,stats:=rangegotStats {
270+
gotStats:=cache.TemplateBuildTimeStats(template.ID)
271+
fortransition,ts:=rangegotStats {
271272
iftransition==wantTransition {
272-
require.Equal(t,tt.want.buildTimeMs,*stats.P50)
273-
}else {
274-
require.Empty(
275-
t,stats,"%v",transition,
276-
)
273+
// Checked above
274+
continue
277275
}
276+
require.Empty(t,ts,"%v",transition)
278277
}
279278
}else {
280279
varstats codersdk.TemplateBuildTimeStats

‎coderd/prometheusmetrics/aggregator_test.go‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,19 @@ func verifyCollectedMetrics(t *testing.T, expected []*agentproto.Stats_Metric, a
194194

195195
vard dto.Metric
196196
err:=actual[i].Write(&d)
197-
require.NoError(t,err)
197+
assert.NoError(t,err)
198198

199199
switche.Type {
200200
caseagentproto.Stats_Metric_COUNTER:
201-
require.Equal(t,e.Value,d.Counter.GetValue())
201+
ife.Value!=d.Counter.GetValue() {
202+
returnfalse
203+
}
202204
caseagentproto.Stats_Metric_GAUGE:
203-
require.Equal(t,e.Value,d.Gauge.GetValue())
205+
ife.Value!=d.Gauge.GetValue() {
206+
returnfalse
207+
}
204208
default:
205-
require.Failf(t,"unsupported type: %s",string(e.Type))
209+
assert.Failf(t,"unsupported type: %s",string(e.Type))
206210
}
207211

208212
expectedLabels:=make([]*agentproto.Stats_Metric_Label,len(e.Labels))
@@ -215,7 +219,7 @@ func verifyCollectedMetrics(t *testing.T, expected []*agentproto.Stats_Metric, a
215219
}
216220
sort.Slice(expectedLabels,sortFn)
217221
sort.Slice(dtoLabels,sortFn)
218-
require.Equal(t,expectedLabels,dtoLabels,d.String())
222+
assert.Equal(t,expectedLabels,dtoLabels,d.String())
219223
}
220224
returntrue
221225
}
@@ -229,7 +233,7 @@ func prometheusMetricToString(t *testing.T, m prometheus.Metric) string {
229233

230234
vard dto.Metric
231235
err:=m.Write(&d)
232-
require.NoError(t,err)
236+
assert.NoError(t,err)
233237
dtoLabels:=asMetricAgentLabels(d.GetLabel())
234238
sort.Slice(dtoLabels,func(i,jint)bool {
235239
returndtoLabels[i].Name<dtoLabels[j].Name

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ require (
175175
github.com/spf13/aferov1.14.0
176176
github.com/spf13/pflagv1.0.6
177177
github.com/sqlc-dev/pqtypev0.3.0
178-
github.com/stretchr/testifyv1.10.0
178+
github.com/stretchr/testifyv1.11.1
179179
github.com/swaggo/http-swagger/v2v2.0.1
180180
github.com/swaggo/swagv1.16.2
181181
github.com/tidwall/gjsonv1.18.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,8 +1769,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
17691769
github.com/stretchr/testifyv1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
17701770
github.com/stretchr/testifyv1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
17711771
github.com/stretchr/testifyv1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1772-
github.com/stretchr/testifyv1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
1773-
github.com/stretchr/testifyv1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1772+
github.com/stretchr/testifyv1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
1773+
github.com/stretchr/testifyv1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
17741774
github.com/swaggest/assertjsonv1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ=
17751775
github.com/swaggest/assertjsonv1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU=
17761776
github.com/swaggo/files/v2v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp