This commit is contained in:
@@ -54,5 +54,23 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
|
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
|
||||||
|
|
||||||
|
- name: Test plugins endpoint from runner
|
||||||
|
run: |
|
||||||
|
echo "Test 1: curl with token via Basic auth"
|
||||||
|
curl -s -w "\nHTTP %{http_code}\n" \
|
||||||
|
-u "${{ secrets.SONAR_TOKEN }}:" \
|
||||||
|
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2
|
||||||
|
echo "---"
|
||||||
|
echo "Test 2: curl with token via Bearer auth"
|
||||||
|
curl -s -w "\nHTTP %{http_code}\n" \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.SONAR_TOKEN }}" \
|
||||||
|
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2
|
||||||
|
echo "---"
|
||||||
|
echo "Test 3: same Java User-Agent the scanner uses"
|
||||||
|
curl -s -w "\nHTTP %{http_code}\n" \
|
||||||
|
-u "${{ secrets.SONAR_TOKEN }}:" \
|
||||||
|
-H "User-Agent: ScannerCLI/5.0.2.4997" \
|
||||||
|
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2
|
||||||
|
|
||||||
- name: SonarScanner End
|
- name: SonarScanner End
|
||||||
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user