Skip to content
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

Bump github.com/maxatome/go-testdeep from 1.10.1 to 1.11.0 #2595

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 14, 2022

Bumps github.com/maxatome/go-testdeep from 1.10.1 to 1.11.0.

Release notes

Sourced from github.com/maxatome/go-testdeep's releases.

v1.11.0

New features

  • [JSON], [SubJSONOf] and [SuperJSONOf] operators:
    • Now:
      td.JSON(`{"foo": $1}`, td.Between(12, 34))
      td.JSON(`{"foo": Between($1, $2)}`, 12, 34)
      act the same way. Since v1.10.1 rework, the second was not working as expected.
      At the same time:
      td.JSON(`{"foo": Between(12, 34, $1)}`, td.BoundsOutIn)
      now works as expected. It was rejected before,
    • int_lit & float_lit numbers, as defined in go specification, are now accepted in JSON, allowing, for example, to embed hexadecimal numbers in expected JSON;
  • [Between] operator accepts time.Duration as TO when FROM is a time.Time;
  • [Between], [Gt], [Gte], [Lt] and [Lte] operators:
    • now handle values implementing Compare or Less methods:
      Compare and/or Less methods signatures follow:
      func (a T) Less(b T) bool   // returns true if a < b
      func (a T) Compare(b T) int // returns -1 if a < b, 1 if a > b, 0 if a == b
      for example, the new go1.18 net/netip.Addr implements both,
    • failure reports display numbers as elsewhere,
    • some docs have been fixed;
  • [Smuggle] can now cast values, allowing such things:
    // A string containing JSON
    got := `{ "foo": 123 }`
    td.Cmp(t, got, td.Smuggle(json.RawMessage{}, td.JSON(`{"foo":123}`))
    // or
    td.Cmp(t, got, td.Smuggle((json.RawMessage)(nil), td.JSON(`{"foo":123}`))
  • in report failures, the stack trace was displayed if it contained at least 2 levels. Now it is also displayed if it contains one level BUT the source file path contains a directory. It helps to localize quickly the errors in large repositories;
  • td.T gains 3 new methods to log with a stack trace: LogTrace, ErrorTrace and FatalTrace;
  • handle go1.17 []T*[n]T convertibility edge case;
  • in failure reports (float64) type is now omitted (like (int) and (bool) already were), but the value always contains a "." (except if ±Inf, NaN or with exponent) to distinguish them from int.

Fixes

  • [Contains]: slice in slice search didn't work at end of slice;
  • [JSON], [SubJSONOf] and [SuperJSONOf] operators panicked when using [All]+JSON-operator+embeddedOp+$1;
  • anchoring 2 slices at the same time didn't work.

Miscellaneous

... (truncated)

Commits
  • 4aa5af6 feat(JSON): accept int_lit & float_lit numbers as defined in go spec
  • 4e544bd feat(Between): handles value implementing Compare & Less methods
  • 515da4a feat: in failure reports float64 type is now omitted (like int)
  • 13f6a18 fix(anchor): anchoring 2 slices at the same time didn't work
  • 55d8ae0 fix(JSON): a panic could occur when using All+JSON+embeddedOp+$1
  • 5d81cbf ci: use install-go.pl v3.0
  • f2cbc93 ci: make linters happy
  • ef3e0f2 feat: add (*td.T).{Log,Error,Fatal}Trace() methods
  • fca3a78 feat: failure stack trace starting one level if one directory involved
  • f04021a ci: use golangci-lint 1.43.0 + add bidichk linter
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that 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 after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/maxatome/go-testdeep](https://github.com/maxatome/go-testdeep) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/maxatome/go-testdeep/releases)
- [Commits](maxatome/go-testdeep@v1.10.1...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/maxatome/go-testdeep
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 14, 2022
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 14, 2022
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 14, 2022
Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dependabot[bot], njuettner

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 14, 2022
@k8s-ci-robot k8s-ci-robot merged commit b9f2fab into master Feb 14, 2022
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/maxatome/go-testdeep-1.11.0 branch February 14, 2022 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. dependencies Pull requests that update a dependency file lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants