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

(#2872, #2884) Add automated regression tests for v1.2.1 #2923

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

vexx32
Copy link
Member

@vexx32 vexx32 commented Dec 5, 2022

Description Of Changes

  • Add test package and test for functionality of [A] Yes to all prompt actions
  • Add test for functionality of choco upgrade when given multiple packages to upgrade at once.

Motivation and Context

Keepin' up with the tests.

Testing

  1. Run vagrant image tests for choco install and choco upgrade command
  2. New tests should pass on build from hotfix/1.2.1 but fail under choco 1.2.0.

Operating Systems Testing

N/A

Change Types Made

  • Tests added
  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Tests for #2872

@vexx32 vexx32 requested a review from corbob December 5, 2022 16:40
@vexx32 vexx32 changed the base branch from develop to hotfix/1.2.1 December 5, 2022 16:40
@vexx32 vexx32 changed the title (#2872) Add tests for [A] Yes to all option on prompts (#2872, #2884) Add automated regression tests for v1.2.1 Dec 5, 2022
Copy link
Member

@corbob corbob left a comment

Choose a reason for hiding this comment

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

These look good to me. I've run the tests against Test Kitchen, and aside from the multiple packages failing due to missing the package on the internal repository they all worked as expected.

Just a note about possibly not Trim()ing strings we've already Trim()ed 🤷

tests/chocolatey-tests/commands/choco-install.Tests.ps1 Outdated Show resolved Hide resolved
In v1.2.0 choco would fall to pieces on being asked to upgrade multiple
packages in a a single command, or when upgrading a package that also
needed to upgrade a dependency. The second package installation would
fail.

This regression test ensures that we can safely `upgrade` multiple
packages at once.
Copy link
Member

@corbob corbob left a comment

Choose a reason for hiding this comment

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

LGTM!

@corbob corbob merged commit 4b2b8a6 into chocolatey:hotfix/1.2.1 Dec 6, 2022
@corbob
Copy link
Member

corbob commented Dec 6, 2022

Thanks for getting these tests added @vexx32!

@vexx32 vexx32 deleted the 2872-tests branch December 16, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants