Skip to content

Commit

Permalink
publish test report for arm,bicep e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maniSbindra committed Mar 21, 2024
1 parent ff6b7c9 commit c8be115
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/az-mpf-e2e-arm-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ jobs:
export MPF_BICEPEXECPATH=/usr/local/bin/bicep
go install github.com/jstemmer/go-junit-report@latest
go test ./e2eTests -v -run TestARM TestBicep | tee TestResults-${{ matrix.go-version }}.txt
# | go-junit-report -set-exit-code > TestResults-${{ matrix.go-version }}.xml
cat TestResults-${{ matrix.go-version }}.txt | go-junit-report -set-exit-code > TestResults-${{ matrix.go-version }}.xml
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.txt
path: TestResults-${{ matrix.go-version }}.xml

# - name: Test Summary
# uses: test-summary/action@v1
# with:
# paths: |
# TestResults-${{ matrix.go-version }}.xml
# if: always()
- name: Test Summary
uses: test-summary/action@v1
with:
paths: |
TestResults-${{ matrix.go-version }}.xml
if: always()
3 changes: 0 additions & 3 deletions .github/workflows/az-mpf-e2e-terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ jobs:

- name: Test with Go
run: |
# cd e2eTests
which terraform
export MPF_TFPATH="/usr/local/bin/terraform"
$MPF_TFPATH --version
# pwd
# find .
go install github.com/jstemmer/go-junit-report@latest
go test ./e2eTests -v -timeout 20m -run TestTerraform | tee TestResults-${{ matrix.go-version }}.txt
cat TestResults-${{ matrix.go-version }}.txt | go-junit-report -set-exit-code > TestResults-${{ matrix.go-version }}.xml
Expand Down
2 changes: 1 addition & 1 deletion pkg/domain/authorizationErrorParser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestSingleAuthorizationSpaceFailedError(t *testing.T) {
}

func TestSingleLinkedAuthorizationFailedError(t *testing.T) {
singleLinkedAuthorizationFailedError := "error: LinkedAuthorizationFailed: The client '***REMOVED***' with object id '***REMOVED***' has permission to perform action 'Microsoft.ContainerService/managedClusters/write' on scope '/subscriptions/SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS/resourceGroups/az-mpf-tf-test-rg/providers/Microsoft.ContainerService/managedClusters/aks-32a70ccbb3247e2b'; however, it does not have permission to perform action(s) 'Microsoft.Network/virtualNetworks/subnets/join/action' on the linked scope(s) '/subscriptions/SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS/resourceGroups/az-mpf-tf-test-rg/providers/Microsoft.Network/virtualNetworks/vnet-32a70ccbb3247e2b/subnets/subnet-32a70ccbb3247e2b' (respectively) or the linked scope(s) are invalid."
singleLinkedAuthorizationFailedError := "error: LinkedAuthorizationFailed: The client 'a31fc7f1-1349-4b3c-af16-60422be430cc' with object id 'a31fc7f1-1349-4b3c-af16-60422be430cc' has permission to perform action 'Microsoft.ContainerService/managedClusters/write' on scope '/subscriptions/SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS/resourceGroups/az-mpf-tf-test-rg/providers/Microsoft.ContainerService/managedClusters/aks-32a70ccbb3247e2b'; however, it does not have permission to perform action(s) 'Microsoft.Network/virtualNetworks/subnets/join/action' on the linked scope(s) '/subscriptions/SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS/resourceGroups/az-mpf-tf-test-rg/providers/Microsoft.Network/virtualNetworks/vnet-32a70ccbb3247e2b/subnets/subnet-32a70ccbb3247e2b' (respectively) or the linked scope(s) are invalid."
spm, err := GetScopePermissionsFromAuthError(singleLinkedAuthorizationFailedError)
l := len(spm)
assert.Nil(t, err)
Expand Down

0 comments on commit c8be115

Please sign in to comment.