Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: dhruv0000 <[email protected]>
  • Loading branch information
dhruv0000 committed Mar 17, 2021
1 parent 1e8ffa9 commit 92d8cea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions smi-conformance/grpc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
// A hacky way to see the testStep Failed, since KUDO only provides it in Failure.Message
re := regexp.MustCompile(`[0-9]+`)
stepFailed := re.FindAllString(res.Failure.Message, 1)
passed, _ := strconv.Atoi(stepFailed[0])
passed = passed - 1
failures := stepsCount[res.Name] - passed
totalFailures += failures
if (passed) >= (stepsCount[res.Name] / 2) {
d.Capability = conformance.Capability_HALF
if len(stepFailed) != 0 {
passed, _ := strconv.Atoi(stepFailed[0])
passed = passed - 1
failures := stepsCount[res.Name] - passed
totalFailures += failures
if (passed) >= (stepsCount[res.Name] / 2) {
d.Capability = conformance.Capability_HALF
}
}
}
details = append(details, d)
Expand Down
2 changes: 1 addition & 1 deletion smi-conformance/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
serviceAccountName: meshery
containers:
- name: smi-conformance
image: "learn-layer5/learn-layer5:smi"
image: "layer5/learn-layer5:smi"
imagePullPolicy: Always
ports:
- name: grpc
Expand Down

0 comments on commit 92d8cea

Please sign in to comment.