Skip to content

Conversation

@letFunny
Copy link
Collaborator

@letFunny letFunny commented Jan 8, 2024

To make the content transparent and facilitate testing by creating the minimal working package, this PR changes the tests to avoid relying on base files, instead creating the package for the tests explicitly. The new package contains only the relevant testing data.

  • Have you signed the CLA?

To make the content transparent and facilitate changing the package,
this commit creates the deb used for testing programmatically instead of
embedding it as a base64-encoded blob directly.
Copy link

@rebornplusplus rebornplusplus left a comment

Choose a reason for hiding this comment

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

The passing tests are assuring me that the necessary files are intact since we check modes and hashes in the tests.
Left a nit comment about the name below. Otherwise, looks overall good to me.

abj2Z7KoYMBXz9dwNNP2Aw13FguKkogezW5cqy4lCg==
`
func init() {
PackageData["base-files"] = MustMakeDeb(baseFilesPackageEntries)

Choose a reason for hiding this comment

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

I wonder if we should keep calling it base-files since it contains file not found in traditional base-files packages. For example, the /usr/bin/hello script. And also lacks a few files (and dirs) from the usual base-files packages.

Since we are refactoring, how about renaming the entry to something like test-package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There has been a change of plan, we are no longer going to change base-files but the tests instead. Gustavo had a good point about the previous version of the PR not being the best solution, either we use a real package or we create tests data specifically.

@letFunny letFunny marked this pull request as draft January 9, 2024 15:21
@letFunny letFunny changed the title remove deb package blob used for testing revamp extract_test to avoid relying on base-files Jan 11, 2024
@letFunny letFunny marked this pull request as ready for review January 19, 2024 10:45
@letFunny letFunny requested a review from niemeyer January 30, 2024 10:46
@letFunny letFunny changed the title revamp extract_test to avoid relying on base-files remove deb package blob used for testing Jan 31, 2024
Copy link

@rebornplusplus rebornplusplus left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks! I just left a nitpick comment.

@letFunny letFunny added the Priority Look at me first label Feb 7, 2024
Copy link
Contributor

@niemeyer niemeyer left a comment

Choose a reason for hiding this comment

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

Thanks, that's looking nice. Just superficial comments.

@letFunny letFunny requested a review from niemeyer February 26, 2024 11:58
Copy link
Contributor

@niemeyer niemeyer left a comment

Choose a reason for hiding this comment

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

Thanks!

@niemeyer niemeyer merged commit fdb2e54 into canonical:main Mar 7, 2024
@letFunny letFunny deleted the remove-deb-blob branch October 17, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority Look at me first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants