Skip to content

Conversation

@disq
Copy link
Member

@disq disq commented Jan 31, 2024

Saving *testing.T inside the Suite to use it later in sub-tests results in this error if we have a failed test:

testing.go:1490: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test

We shouldn't get this error.

Other parts of the test suite return error (signature is func (s *WriterTestSuite) testName(context.Context) error) and we do a simple t.Fatal in the main test body, but for DeleteStale tests we use testify/require inside the test so we need to access *testing.T.

@github-actions github-actions bot added fix and removed fix labels Jan 31, 2024
@disq disq added the automerge label Jan 31, 2024
@github-actions
Copy link

github-actions bot commented Jan 31, 2024

⏱️ Benchmark results

  • Glob-8 ns/op: 92.36

Copy link
Contributor

@candiduslynx candiduslynx left a comment

Choose a reason for hiding this comment

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

Do we have an option to switch to a proper test suites?

@kodiakhq kodiakhq bot merged commit 63e95e7 into cloudquery:main Jan 31, 2024
@disq disq deleted the fix/test-suite-parent-test-access branch January 31, 2024 10:29
kodiakhq bot pushed a commit that referenced this pull request Jan 31, 2024
🤖 I have created a release *beep* *boop*
---


## [4.29.0](v4.28.0...v4.29.0) (2024-01-31)


### Features

* Introduce `PrimaryKeyComponent` ([#1491](#1491)) ([ae4a26e](ae4a26e))


### Bug Fixes

* **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.7.1 ([#1499](#1499)) ([165be4d](165be4d))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.16.7 ([#1500](#1500)) ([2b98dab](2b98dab))
* Remove access to parent tests in test suite ([#1497](#1497)) ([63e95e7](63e95e7))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@disq
Copy link
Member Author

disq commented Jan 31, 2024

@candiduslynx wdym?

@candiduslynx
Copy link
Contributor

@candiduslynx wdym?

Utilize https://pkg.go.dev/github.com/stretchr/testify/suite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants