Skip to content

Commit

Permalink
Merge pull request #62 from layer5io/kumarabd/bug/smi-port-2
Browse files Browse the repository at this point in the history
changed timeout and parameter values
  • Loading branch information
leecalcote committed Sep 16, 2020
2 parents efdd47d + 8b4d755 commit 79cf113
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 36 deletions.
72 changes: 41 additions & 31 deletions smi-conformance/conformance/conformance.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion smi-conformance/conformance/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ message Detail {
string assertions = 3;
string result = 4;
string reason = 5;
string capability = 6;
string status = 7;
}

message Response {
string capability = 1;
string passpercent = 1;
string casespassed = 2;
repeated Detail details = 3;
}
Expand Down
9 changes: 8 additions & 1 deletion smi-conformance/grpc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,25 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
Smispec: res.Name,
Time: res.Time,
Assertions: strconv.Itoa(res.Assertions),
Capability: "Full",
Status: "Passing",
}
if len(res.Failure.Text) > 2 {
d.Reason = res.Failure.Text
d.Result = res.Failure.Message
d.Status = "Failing"
d.Capability = "None"
failures += 1
if (res.Assertions - failures) > (res.Assertions / 2) {
d.Capability = "Half"
}
}
details = append(details, d)
}

return &conformance.Response{
Casespassed: strconv.Itoa(totalcases - failures),
Capability: strconv.Itoa(((totalcases - failures) / totalcases) * 100),
Passpercent: strconv.Itoa(((totalcases - failures) / totalcases) * 100),
Details: details,
}, nil
}
5 changes: 2 additions & 3 deletions smi-conformance/test-gen/test_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ func RunTest(meshConfig ServiceMesh, annotations, labels map[string]string) Resu
// Run only traffic-split
// testToRun := "traffic-split"

startKIND := false
options := harness.TestSuite{}

args := []string{"./test-yamls/"}

options.TestDirs = args
options.Timeout = 300
options.Timeout = 120
options.Parallel = 1
options.TestDirs = manifestDirs
options.StartKIND = startKIND
options.StartKIND = false
options.SkipDelete = false

if options.KINDContext == "" {
Expand Down

0 comments on commit 79cf113

Please sign in to comment.