From 92d8cea8af403e5106788aa43acfd012d93067d7 Mon Sep 17 00:00:00 2001 From: dhruv0000 Date: Wed, 17 Mar 2021 12:54:36 +0530 Subject: [PATCH] Minor changes Signed-off-by: dhruv0000 --- smi-conformance/grpc/handlers.go | 14 ++++++++------ smi-conformance/manifest.yml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/smi-conformance/grpc/handlers.go b/smi-conformance/grpc/handlers.go index b15cda9..0ad2c59 100644 --- a/smi-conformance/grpc/handlers.go +++ b/smi-conformance/grpc/handlers.go @@ -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) diff --git a/smi-conformance/manifest.yml b/smi-conformance/manifest.yml index 4063e8f..0703b55 100644 --- a/smi-conformance/manifest.yml +++ b/smi-conformance/manifest.yml @@ -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