Skip to content

Conversation

@woky
Copy link
Contributor

@woky woky commented Jun 21, 2023

Add MakeTestDeb() function to testutil/pkgdata. This function is just
like MakeDeb() except that it doesn't return an error. Instead, it
panics on errors.

This is useful in tests where package data is created in top-level test
case structures where we don't need to handle the error, e.g.:

var testCases = []TestCase{{
	pkg: MakeTestDeb([]TarEntry{
		...
	}),
}, {
	...
}}

@woky woky added the Priority Look at me first label Jun 21, 2023
@cjdcordeiro cjdcordeiro removed the Priority Look at me first label Jun 22, 2023
Add MakeTestDeb() function to testutil/pkgdata. This function is just
like MakeDeb() except that it doesn't return an error. Instead, it
panics on errors.

This is useful in tests where package data is created in top-level test
case structures where we don't need to handle the error, e.g.:

	var testCases = []TestCase{{
		pkg: MakeTestDeb([]TarEntry{
			...
		}),
	}, {
		...
	}}
@woky woky force-pushed the pub/testutil-pkgdata-test-deb branch from 3555931 to 996381f Compare June 22, 2023 10:38
@woky woky changed the title testutil: Add MakeTestDeb() testutil/pkgdata: Add MakeTestDeb() Jun 22, 2023
@woky woky added the Priority Look at me first label Jun 28, 2023
@woky woky requested review from cmatsuoka and flotter August 2, 2023 08:18
@cjdcordeiro cjdcordeiro added the Simple Nice for a quick look on a minute or two label Aug 7, 2023
@niemeyer niemeyer added the Reviewed Supposedly ready for tuning or merging label Aug 28, 2023
@woky woky requested a review from niemeyer August 29, 2023 10:09
@woky
Copy link
Contributor Author

woky commented Aug 29, 2023

Changed the name of the function.

Copy link
Member

@jnsgruk jnsgruk left a comment

Choose a reason for hiding this comment

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

Requested changes all made, thanks @woky - I'll merge this now.

@jnsgruk jnsgruk merged commit 5e8cdac into canonical:main Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority Look at me first Reviewed Supposedly ready for tuning or merging Simple Nice for a quick look on a minute or two

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants