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 panic in acceptance test due to nil BuilderSet #12708

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

nywilken
Copy link
Contributor

@nywilken nywilken commented Nov 23, 2023

  • Update Acceptance Test to include BuilderSet
  • Update didyoumean to call provisioners.List()

Acceptance Test Results

....
--- PASS: TestProvisionerPrepare_Config (0.00s)
=== RUN   TestProvisionerPrepare_InvalidKey
--- PASS: TestProvisionerPrepare_InvalidKey (0.00s)
=== RUN   TestProvisionerPrepare_Script
--- PASS: TestProvisionerPrepare_Script (0.00s)
=== RUN   TestProvisionerPrepare_ScriptAndInline
--- PASS: TestProvisionerPrepare_ScriptAndInline (0.00s)
=== RUN   TestProvisionerPrepare_ScriptAndScripts
--- PASS: TestProvisionerPrepare_ScriptAndScripts (0.00s)
=== RUN   TestProvisionerPrepare_Scripts
--- PASS: TestProvisionerPrepare_Scripts (0.00s)
=== RUN   TestProvisionerPrepare_EnvironmentVars
--- PASS: TestProvisionerPrepare_EnvironmentVars (0.00s)
=== RUN   TestProvisionerQuote_EnvironmentVars
--- PASS: TestProvisionerQuote_EnvironmentVars (0.00s)
=== RUN   TestProvisionerProvision_Inline
2023/11/22 21:15:58 ui: Provisioning with windows-shell...
2023/11/22 21:15:58 Found command: whoami
2023/11/22 21:15:58 ui: Provisioning with shell script: /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/windows-shell-provisioner1869498396
2023/11/22 21:15:58 Opening /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/windows-shell-provisioner1869498396 for reading
2023/11/22 21:15:58 ui: Provisioning with windows-shell...
2023/11/22 21:15:58 Found command: whoami
2023/11/22 21:15:58 ui: Provisioning with shell script: /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/windows-shell-provisioner1055042501
2023/11/22 21:15:58 Opening /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/windows-shell-provisioner1055042501 for reading
--- PASS: TestProvisionerProvision_Inline (0.00s)
=== RUN   TestProvisionerProvision_Scripts
2023/11/22 21:15:58 ui: Provisioning with windows-shell...
2023/11/22 21:15:58 ui: Provisioning with shell script: /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/packer794804095
2023/11/22 21:15:58 Opening /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/packer794804095 for reading
--- PASS: TestProvisionerProvision_Scripts (0.00s)
=== RUN   TestProvisionerProvision_ScriptsWithEnvVars
2023/11/22 21:15:58 ui: Provisioning with windows-shell...
2023/11/22 21:15:58 ui: Provisioning with shell script: /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/packer1537855323
2023/11/22 21:15:58 Opening /var/folders/jd/zhl6kpsn1156cmqdyttt22xm0000gp/T/packer1537855323 for reading
--- PASS: TestProvisionerProvision_ScriptsWithEnvVars (0.00s)
=== RUN   TestProvisioner_createFlattenedEnvVars_windows
--- PASS: TestProvisioner_createFlattenedEnvVars_windows (0.00s)
=== RUN   TestCancel
--- PASS: TestCancel (0.00s)
PASS

This change initializes a MapOfBuilders with the test builder to fix a
panic with checking if the initialized BuilderSet has an entry for the
test builder.
@nywilken nywilken requested a review from a team as a code owner November 23, 2023 02:14
@nywilken nywilken changed the title update/missing builder warning Fix panic in acceptance test due to nil BuilderSet Nov 23, 2023
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this one @nywilken!

LGTM

@nywilken nywilken added the backport/1.10.x Backport PR changes to `release/1.10.x` label Nov 23, 2023
@nywilken nywilken merged commit 17ff508 into main Nov 23, 2023
10 checks passed
@nywilken nywilken added the tech-debt Issues and pull requests related to addressing technical debt or improving the codebase label Dec 4, 2023
Copy link

github-actions bot commented Jan 4, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.10.x Backport PR changes to `release/1.10.x` tech-debt Issues and pull requests related to addressing technical debt or improving the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants