Skip to content

Commit

Permalink
Debug un reported test case
Browse files Browse the repository at this point in the history
  • Loading branch information
anupama2501 committed Dec 24, 2024
1 parent 7aeea53 commit ab95171
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ node {
} catch(err) {
echo "Post upgrade $it had failures: " + err
}
sh "./${qaseRun} --startRun=false"
}

parallel jobs
} catch(err){
echo "Post upgrade tests had failures: " + err
}
sh "./${qaseRun} --startRun=false"
}
stage('Delete Rancher and resources') {
if (cleanup.toBoolean()) {
Expand Down
11 changes: 11 additions & 0 deletions tests/v2/validation/pipeline/qase/reporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func main() {
}

err = reportTestQases(client, runID)
logrus.Info("Error getting the test case report.")

if err != nil {
logrus.Error("error reporting: ", err)
}
Expand Down Expand Up @@ -91,6 +93,8 @@ func getAllAutomationTestCases(client *qase.APIClient) (map[string]qase.TestCase

func readTestCase() ([]testcase.GoTestOutput, error) {
file, err := os.Open(testResultsJSON)

logrus.Info("Printing the testResultsJson", file)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -157,6 +161,8 @@ func parseCorrectTestCases(testCases []testcase.GoTestOutput) map[string]*testca

func reportTestQases(client *qase.APIClient, testRunID int64) error {
tempTestCases, err := readTestCase()

logrus.Info("Printing the tempTestCases", tempTestCases)
if err != nil {
return nil
}
Expand All @@ -173,6 +179,8 @@ func reportTestQases(client *qase.APIClient, testRunID int64) error {
if testQase, ok := qaseTestCases[goTestCase.Name]; ok {
// update test status
err = updateTestInRun(client, *goTestCase, testQase.Id, testRunID)
logrus.Info("Found test case in test run")

if err != nil {
return err
}
Expand All @@ -183,11 +191,14 @@ func reportTestQases(client *qase.APIClient, testRunID int64) error {
} else {
// write test case
caseID, err := writeTestCaseToQase(client, *goTestCase)
logrus.Info(" Updated test run step1 ")

if err != nil {
return err
}

err = updateTestInRun(client, *goTestCase, caseID.Result.Id, testRunID)
logrus.Info(" Updated test run")
if err != nil {
return err
}
Expand Down

0 comments on commit ab95171

Please sign in to comment.