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

fix: Make metadata tests more resilient. #6771

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Conversation

gonfunko
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

#6768

Proposed Changes

This PR updates the metadata test to verify that the previous size of the files is not undefined, in order to trigger an explicit test failure in the situation reported in #6768. It also updates the check_metadata.sh file to remove errant whitespace before the file sizes that was causing the regex in test_tasks.js to fail to identify the old file sizes when running the test. Finally, it updates update_metadata.sh to strip whitespace when updating the file sizes in check_metadata.sh to avoid this issue recurring.

Behavior Before Change

Metadata test scripts didn't actually check the change in filesize and passed regardless.

Behavior After Change

Metadata test scripts work properly.

@gonfunko gonfunko requested a review from a team as a code owner January 13, 2023 16:26
@gonfunko gonfunko requested a review from BeksOmega January 13, 2023 16:26
@github-actions github-actions bot added the PR: fix Fixes a bug label Jan 13, 2023
scripts/gulpfiles/test_tasks.js Outdated Show resolved Hide resolved
tests/scripts/update_metadata.sh Outdated Show resolved Hide resolved
@BeksOmega BeksOmega merged commit e89fcea into google:develop Jan 17, 2023
@gonfunko gonfunko deleted the metadata branch January 17, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants