Skip to content

SCCIRCLE-16 Add test for sonar_token_variable_name property#41

Closed
antoine-vinot-sonarsource wants to merge 4 commits intomasterfrom
avi/fix-sonar-token-name
Closed

SCCIRCLE-16 Add test for sonar_token_variable_name property#41
antoine-vinot-sonarsource wants to merge 4 commits intomasterfrom
avi/fix-sonar-token-name

Conversation

@antoine-vinot-sonarsource
Copy link
Contributor

@antoine-vinot-sonarsource antoine-vinot-sonarsource commented Oct 6, 2025

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Add test for sonar_token_variable_name property SCCIRCLE-16 Add test for sonar_token_variable_name property Oct 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds integration test for custom SonarCloud token variable name functionality.

• New test job test-sonar-token-variable-name validates using custom token variable name MY_SONAR_TOKEN
• Test verifies the scanner respects the sonar_token_variable_name parameter instead of default SONAR_TOKEN
• Integration test added to CI workflow with proper dependency chain for publishing

Review focus: Verify the test assertion correctly validates that MY_SONAR_TOKEN appears in output when custom variable name is used.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds integration test for custom SonarCloud token variable name functionality.

New test job: test-sonar-token-variable-name validates the sonar_token_variable_name parameter
Workflow integration: Added test to deployment pipeline with proper filtering and dependencies
Test validation: Verifies custom token variable name appears in SonarCloud scanner output

Review focus: Ensure the test properly validates that MY_SONAR_TOKEN parameter is correctly passed to the SonarCloud orb and verify the assertion logic in the output check.

💬 Please send your feedback

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds integration test for custom SonarCloud token variable configuration.

• New test job test-sonar-token-variable-name validates the sonar_token_variable_name parameter
• Test uses MY_SONAR_TOKEN parameter while setting SONAR_TOKEN environment variable
• Integration test added to workflow with proper filtering and dependency configuration

Review focus: Verify the test correctly validates token variable name mismatch scenarios.

💬 Please send your feedback

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds integration test for SonarCloud orb custom token variable configuration.

• New test job test-sonar-token-variable-name validates the sonar_token_variable_name parameter
• Job uses fake token in SONAR_TOKEN env var but configures orb to look for MY_SONAR_TOKEN
• Integration added to both test and publish workflows with appropriate filters

Review focus: Verify the test properly validates token variable name mismatch behavior and expected failure scenarios.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds integration test for custom Sonar token variable name parameter.

• New test job test-sonar-token-variable-name validates the sonar_token_variable_name parameter functionality
• Uses custom environment variable MY_SONAR_TOKEN instead of default token variable
• Integrates test into CI workflow with proper filtering and dependency configuration

Review focus: Verify the custom token variable parameter works correctly and test assertions are appropriate.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

🤖 Pull Request summary

Adds configurable SonarCloud token variable name support to the orb.

• Introduces sonar_token_variable_name parameter allowing custom environment variable names for SonarCloud tokens
• Updates scan script to dynamically resolve token from specified variable name instead of hardcoded SONAR_TOKEN
• Adds integration test to verify custom token variable functionality

Review focus: Error handling in the token resolution logic - ensure the script properly handles missing environment variables and provides clear error messages.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

@antoine-vinot-sonarsource
Copy link
Contributor Author

See #40 (comment)

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