mirror of
https://github.com/storytold/craft-common-actions.git
synced 2026-11-06 02:22:15 +00:00
Match the SonarCloud token fallback the scan actually uses (#139)
This commit is contained in:
1 parent
e78816ca65
commit
ea2cae4a03
1 file changed
+6
-1
@@ -71,7 +71,12 @@ class SonarCloudTests(unittest.TestCase):
|
||||
self.assertEqual(self.validation['if'], "steps.token.outputs.available == 'true'")
|
||||
self.assertEqual(self.scan['if'], self.validation['if'])
|
||||
self.assertEqual(self.scan['env']['SONAR_HOST_URL'], 'https://sonarcloud.io')
|
||||
self.assertEqual(self.scan['env']['SONAR_TOKEN'], '${{ secrets.SONAR_TOKEN }}')
|
||||
# The scan consumes whatever the validation step accepted: the SonarCloud PAT when the
|
||||
# repo has one, otherwise the plain project token.
|
||||
self.assertEqual(
|
||||
self.scan['env']['SONAR_TOKEN'],
|
||||
'${{ secrets.SONAR_CLOUD_PAT || secrets.SONAR_TOKEN }}',
|
||||
)
|
||||
self.assertEqual(
|
||||
self.scan['with']['args'].splitlines()[0],
|
||||
'"-Dsonar.projectKey=${{ steps.project.outputs.key }}" -Dsonar.organization=storytold '
|
||||
|
||||
Reference in new issue
Block a user