Skip to content

Commit b6a72fb

Browse files
committed
Updated tgz to test helm charts
Signed-off-by: dhruv0000 <patel.4@iitj.ac.in>
1 parent 4af3f41 commit b6a72fb

File tree

8 files changed

+132
-142
lines changed

8 files changed

+132
-142
lines changed

charts/smi-conformance-0.1.0.tgz

-6 Bytes
Binary file not shown.

charts/smi-conformance/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ labels:
44
app: smi-conformance
55
release: smi-conformance
66
image:
7-
repository: layer5/learn-layer5
7+
repository: dhruv0000/learn-layer5
88
tag: smi
99
pullPolicy: Always
1010
port: 10011

smi-conformance/conformance/conformance.pb.go

Lines changed: 105 additions & 107 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smi-conformance/conformance/conformance.proto

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
syntax = "proto3";
22
import "google/protobuf/empty.proto";
3-
import "service-mesh-performance/common/error.proto";
4-
import "service-mesh-performance/controller/health.proto";
5-
import "service-mesh-performance/controller/info.proto";
3+
import "service-mesh-performance/service/error.proto";
4+
import "service-mesh-performance/service/health.proto";
5+
import "service-mesh-performance/service/info.proto";
66
import "service-mesh-performance/protos/service_mesh.proto";
77

88
package smi_conformance;
@@ -32,7 +32,7 @@ message Request {
3232
message Result {
3333
oneof result {
3434
string message = 1;
35-
common.CommonError error = 2;
35+
service.CommonError error = 2;
3636
}
3737
}
3838

@@ -42,19 +42,19 @@ message Detail {
4242
string assertion = 3;
4343
string duration = 4;
4444
Result result = 5;
45-
ResultStatus status = 6;
45+
Capability capability = 6;
46+
ResultStatus status = 7;
4647
}
4748

4849
message Response {
4950
string passpercent = 1;
5051
string casespassed = 2;
5152
smp.ServiceMesh mesh = 3;
52-
Capability capability = 4;
5353
repeated Detail details = 5;
5454
}
5555

5656
service conformanceTesting{
57-
rpc Info (google.protobuf.Empty) returns (controller.ControllerInfo);
58-
rpc Health (google.protobuf.Empty) returns (controller.ControllerHealth);
57+
rpc Info (google.protobuf.Empty) returns (service.ServiceInfo);
58+
rpc Health (google.protobuf.Empty) returns (service.ServiceHealth);
5959
rpc RunTest (Request) returns (Response);
6060
}

smi-conformance/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/kr/text v0.2.0 // indirect
1111
github.com/kudobuilder/kuttl v0.0.0-00010101000000-000000000000
1212
// github.com/layer5io/meshkit v0.2.0
13-
github.com/layer5io/service-mesh-performance v0.3.2-0.20201223205038-515a2eee2ba1
13+
github.com/layer5io/service-mesh-performance v0.3.1
1414
github.com/mattn/go-isatty v0.0.12 // indirect
1515
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
1616
github.com/onsi/ginkgo v1.14.1 // indirect
@@ -31,4 +31,4 @@ require (
3131

3232
replace github.com/kudobuilder/kuttl => github.com/layer5io/kuttl v0.4.1-0.20200806180306-b7e46afd657f
3333

34-
replace github.com/layer5io/service-mesh-performance v0.3.2-0.20201223205038-515a2eee2ba1 => github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210120125240-fac7de77343c
34+
replace github.com/layer5io/service-mesh-performance v0.3.1 => github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210121151842-880e0308edc5

smi-conformance/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
8383
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
8484
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
8585
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
86-
github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210120125240-fac7de77343c h1:LObvAnr8VARdf7Md6LYJRDWoUrnmWptY1jd/acfSdZc=
87-
github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210120125240-fac7de77343c/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ=
86+
github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210121151842-880e0308edc5 h1:6Y2/PHjnRvXcVlWn+Bcm7rTCireM7BRkVr38r9wK6Ww=
87+
github.com/dhruv0000/service-mesh-performance v0.3.2-0.20210121151842-880e0308edc5/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ=
8888
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
8989
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
9090
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=

smi-conformance/grpc/handlers.go

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import (
77
empty "github.com/golang/protobuf/ptypes/empty"
88
"github.com/layer5io/learn-layer5/smi-conformance/conformance"
99
test_gen "github.com/layer5io/learn-layer5/smi-conformance/test-gen"
10-
common "github.com/layer5io/service-mesh-performance/common"
11-
controller "github.com/layer5io/service-mesh-performance/controller"
10+
service "github.com/layer5io/service-mesh-performance/service"
1211
smp "github.com/layer5io/service-mesh-performance/spec"
1312
)
1413

@@ -65,20 +64,20 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
6564
d := &conformance.Detail{
6665
Smispec: res.Name,
6766
Specversion: "v1alpha1",
68-
Duration: res.Time,
6967
Assertion: strconv.Itoa(res.Assertions),
70-
// Capability: conformance.Capability(conformance.Capability_FULL),
71-
Status: conformance.ResultStatus(conformance.ResultStatus_PASSED),
68+
Duration: res.Time,
69+
Capability: conformance.Capability_FULL,
70+
Status: conformance.ResultStatus_PASSED,
7271
Result: &conformance.Result{
7372
Result: &conformance.Result_Message{
74-
Message: "",
73+
Message: "All test passed",
7574
},
7675
},
7776
}
7877
if len(res.Failure.Text) > 2 {
7978
d.Result = &conformance.Result{
8079
Result: &conformance.Result_Error{
81-
Error: &common.CommonError{
80+
Error: &service.CommonError{
8281
Code: "",
8382
Severity: "",
8483
ShortDescription: res.Failure.Text,
@@ -88,35 +87,28 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
8887
},
8988
},
9089
}
91-
d.Status = conformance.ResultStatus(conformance.ResultStatus_FAILED)
92-
// d.Capability = "None"
90+
d.Status = conformance.ResultStatus_FAILED
91+
d.Capability = conformance.Capability_NONE
9392
failures += 1
9493
if (res.Assertions - failures) > (res.Assertions / 2) {
95-
// d.Capability = "Half"
94+
d.Capability = conformance.Capability_HALF
9695
}
9796
}
9897
details = append(details, d)
9998
}
100-
capability := conformance.Capability_NONE
101-
if totalcases-failures > totalcases/2 {
102-
capability = conformance.Capability_HALF
103-
} else if failures == 0 {
104-
capability = conformance.Capability_FULL
105-
}
10699

107100
return &conformance.Response{
108101
Casespassed: strconv.Itoa(totalcases - failures),
109102
Passpercent: strconv.Itoa(((totalcases - failures) / totalcases) * 100),
110-
Details: details,
111103
Mesh: req.Mesh,
112-
Capability: capability,
104+
Details: details,
113105
}, nil
114106
}
115107

116-
func (s *Service) Info(context.Context, *empty.Empty) (*controller.ControllerInfo, error) {
117-
return &controller.ControllerInfo{}, nil
108+
func (s *Service) Info(context.Context, *empty.Empty) (*service.ServiceInfo, error) {
109+
return &service.ServiceInfo{}, nil
118110
}
119111

120-
func (s *Service) Health(context.Context, *empty.Empty) (*controller.ControllerHealth, error) {
121-
return &controller.ControllerHealth{}, nil
112+
func (s *Service) Health(context.Context, *empty.Empty) (*service.ServiceHealth, error) {
113+
return &service.ServiceHealth{}, nil
122114
}

smi-conformance/smi-conformance

-48.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)