From 90d1953cf3d99e104d277f17d3c4b8d410231d06 Mon Sep 17 00:00:00 2001 From: jzli Date: Fri, 19 Aug 2022 15:35:23 +0800 Subject: [PATCH 01/13] feat: test management --- apis/data/v1alpha1/zz_generated.deepcopy.go | 2 +- apis/meta/v1alpha1/project_types.go | 4 + apis/meta/v1alpha1/testcase_types.go | 96 ++++ apis/meta/v1alpha1/testcase_types_test.go | 36 ++ apis/meta/v1alpha1/testcaseexecution_types.go | 79 ++++ .../v1alpha1/testcaseexecution_types_test.go | 36 ++ apis/meta/v1alpha1/testmodule_types.go | 83 ++++ apis/meta/v1alpha1/testmodule_types_test.go | 53 +++ apis/meta/v1alpha1/testplan_types.go | 127 ++++++ apis/meta/v1alpha1/testplan_types_test.go | 36 ++ apis/meta/v1alpha1/zz_generated.deepcopy.go | 412 ++++++++++++++++++ go.mod | 5 +- go.sum | 87 +++- plugin/client/interface.go | 35 ++ plugin/client/plugin_client.go | 20 + plugin/client/testcase.go | 74 ++++ plugin/client/testcaseexecution.go | 91 ++++ plugin/client/testmodule.go | 57 +++ plugin/client/testplan.go | 87 ++++ plugin/route/repository.go | 2 +- plugin/route/route.go | 45 +- plugin/route/testcase.go | 126 ++++++ plugin/route/testcaseexecution.go | 135 ++++++ plugin/route/testmodule.go | 70 +++ plugin/route/testplan.go | 115 +++++ 25 files changed, 1907 insertions(+), 6 deletions(-) create mode 100644 apis/meta/v1alpha1/testcase_types.go create mode 100644 apis/meta/v1alpha1/testcase_types_test.go create mode 100644 apis/meta/v1alpha1/testcaseexecution_types.go create mode 100644 apis/meta/v1alpha1/testcaseexecution_types_test.go create mode 100644 apis/meta/v1alpha1/testmodule_types.go create mode 100644 apis/meta/v1alpha1/testmodule_types_test.go create mode 100644 apis/meta/v1alpha1/testplan_types.go create mode 100644 apis/meta/v1alpha1/testplan_types_test.go create mode 100644 plugin/client/testcase.go create mode 100644 plugin/client/testcaseexecution.go create mode 100644 plugin/client/testmodule.go create mode 100644 plugin/client/testplan.go create mode 100644 plugin/route/testcase.go create mode 100644 plugin/route/testcaseexecution.go create mode 100644 plugin/route/testmodule.go create mode 100644 plugin/route/testplan.go diff --git a/apis/data/v1alpha1/zz_generated.deepcopy.go b/apis/data/v1alpha1/zz_generated.deepcopy.go index ff66c0eb..c4210c1d 100644 --- a/apis/data/v1alpha1/zz_generated.deepcopy.go +++ b/apis/data/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/apis/meta/v1alpha1/project_types.go b/apis/meta/v1alpha1/project_types.go index a64078ce..a32b5f41 100644 --- a/apis/meta/v1alpha1/project_types.go +++ b/apis/meta/v1alpha1/project_types.go @@ -55,6 +55,7 @@ func (r ProjectSubType) Validate(fld *field.Path) field.ErrorList { MavenRepositoryProjectSubType: {}, RawRepositoryProjectSubType: {}, ProjectManagementSubtype: {}, + TestProjectSubtype: {}, } if _, exist := supportedTypes[r]; !exist { @@ -86,6 +87,9 @@ const ( // ProjectManagementSubtype project management subtype ProjectManagementSubtype ProjectSubType = "ProjectManagement" + // TestProjectSubtype test project subtype + TestProjectSubtype ProjectSubType = "TestProject" + // TODO: add more subtypes ) diff --git a/apis/meta/v1alpha1/testcase_types.go b/apis/meta/v1alpha1/testcase_types.go new file mode 100644 index 00000000..0cc6af60 --- /dev/null +++ b/apis/meta/v1alpha1/testcase_types.go @@ -0,0 +1,96 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestCaseGVK = GroupVersion.WithKind("TestCase") +var TestCaseListGVK = GroupVersion.WithKind("TestCaseList") + +// TestCase object for plugins +type TestCase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestCaseSpec `json:"spec"` + + Status TestCaseStatus `json:"status,omitempty"` +} + +// TestCaseSpec spec for TestCase +type TestCaseSpec struct { + // ID is the test plan id + ID string `json:"id"` + // Type is the type description from integration tools + Type string `json:"type"` + // Prerequisite are the preparations before executing the testcase steps + Prerequisite string `json:"prerequisite"` + // Steps tell testers how to do to execute this case + Steps []TestCaseStepInfo `json:"steps"` + // CreatedBy is the user who created the TestCase + CreatedBy UserSpec `json:"createdBy"` + // Priority shows how important this case is + Priority string `json:"priority"` + // RelatedRequirements is a list of product requirements related to this test case + RelatedRequirements []TestCaseRelatedObjectInfo `json:"relatedRequirements"` + // RelatedBugs is a list of bugs related to this test case + RelatedBugs []TestCaseRelatedObjectInfo `json:"relatedBugs"` +} + +type TestCaseStepInfo struct { + // ID is the id of step generated by integration tools + ID string `json:"id"` + // Description shows how to run this step + Description string `json:"description"` + // Order shows the order of step + Order string `json:"order"` + // Expect shows the expected output after running this step + Expect string `json:"expect"` +} + +type TestCaseRelatedObjectInfo struct { + // Title is the title of related object + Title string `json:"title"` + // TargetURL is the URL for redirection + TargetURL string `json:"targetURL"` +} + +type TestCaseStatus struct { + // LastExecution is spec of the latest TestExecution related to the test case + LastExecution *TestCaseExecutionSpec `json:"lastExecution"` +} + +// TestCaseList list of TestCases +type TestCaseList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestCase `json:"items"` +} + +// TestCaseResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestCaseResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcases", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testcase_types_test.go b/apis/meta/v1alpha1/testcase_types_test.go new file mode 100644 index 00000000..a0cf30d4 --- /dev/null +++ b/apis/meta/v1alpha1/testcase_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestCaseType", func() { + Context("TestCaseResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestCaseResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcases", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testcaseexecution_types.go b/apis/meta/v1alpha1/testcaseexecution_types.go new file mode 100644 index 00000000..d4af3b03 --- /dev/null +++ b/apis/meta/v1alpha1/testcaseexecution_types.go @@ -0,0 +1,79 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestCaseExecutionGVK = GroupVersion.WithKind("TestCaseExecution") +var TestCaseExecutionListGVK = GroupVersion.WithKind("TestCaseExecutionList") + +type TestCaseExecutionStatus string + +// Possible test case execution status below +const ( + TestcaseExecutionStatusPassed TestCaseExecutionStatus = "passed" + TestcaseExecutionStatusFailed TestCaseExecutionStatus = "failed" + TestcaseExecutionStatusBlocked TestCaseExecutionStatus = "blocked" + TestcaseExecutionStatusWaiting TestCaseExecutionStatus = "waiting" +) + +// TestCaseExecution object for plugins +type TestCaseExecution struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestCaseExecutionSpec `json:"spec"` +} + +// TestCaseExecutionSpec spec for TestCaseExecution +type TestCaseExecutionSpec struct { + // TestPlanID refers to the test plan including current test case + TestPlanID string `json:"testPlanId"` + + // BuildRef refers to the build related to current test case + BuildRef *TestObjectRef `json:"buildRef"` + + // Status is the execution result status + Status TestCaseExecutionStatus `json:"status"` + + // CreatedAt is the time when test case was executed + CreatedAt metav1.Time `json:"createdAt"` + + // CreatedBy is the user who created the TestCaseExecution + CreatedBy UserSpec `json:"createdBy,omitempty"` +} + +// TestCaseExecutionList list of TestCaseExecutions +type TestCaseExecutionList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestCaseExecution `json:"items"` +} + +// TestCaseExecutionResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestCaseExecutionResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcaseexecutions", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testcaseexecution_types_test.go b/apis/meta/v1alpha1/testcaseexecution_types_test.go new file mode 100644 index 00000000..3c4b0e1f --- /dev/null +++ b/apis/meta/v1alpha1/testcaseexecution_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestCaseExecution", func() { + Context("TestCaseExecutionResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestCaseExecutionResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcaseexecutions", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go new file mode 100644 index 00000000..856b4660 --- /dev/null +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestModuleGVK = GroupVersion.WithKind("TestModule") +var TestModuleListGVK = GroupVersion.WithKind("TestModuleList") + +// TestModule object for plugins +type TestModule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestModuleSpec `json:"spec"` +} + +// TestModuleSpec spec for TestModule +type TestModuleSpec struct { + // ID is the test module id + ID string `json:"id"` + // Order is used to sort modules by ASC order + Order int `json:"order"` + // ParentID is the parent module ID + ParentID string `json:"parentID"` + // TestCases are the cases included by a module + TestCases []TestModuleCaseRef `json:"testCases"` +} + +type TestModuleCaseRef struct { + // TestObjectRef refers to a test case + TestObjectRef `json:"ref"` + // Order indicates the ASC order of the object at same level + Order int `json:"order"` +} + +// TestModuleList list of TestModules +type TestModuleList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestModule `json:"items"` +} + +// TestModuleResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestModuleResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testmodules", + Verb: verb, + } +} + +func (tm *TestModule) ContainsTestCaseID(caseID string) bool { + if tm == nil || tm.Spec.TestCases == nil { + return false + } + + for _, tc := range tm.Spec.TestCases { + if tc.ID == caseID { + return true + } + } + return false +} diff --git a/apis/meta/v1alpha1/testmodule_types_test.go b/apis/meta/v1alpha1/testmodule_types_test.go new file mode 100644 index 00000000..4ad6a816 --- /dev/null +++ b/apis/meta/v1alpha1/testmodule_types_test.go @@ -0,0 +1,53 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestModule", func() { + Context("TestModuleResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestModuleResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testmodules", + Verb: "get", + })) + }) + }) + + Context("ContainsTestCaseID", func() { + tm := TestModule{Spec: TestModuleSpec{ + TestCases: []TestModuleCaseRef{ + { + TestObjectRef: TestObjectRef{ID: "123", Name: "abc"}, + }, + }, + }} + It("returns false if not exist", func() { + Expect(tm.ContainsTestCaseID("456")).To(BeFalse()) + }) + + It("returns true if exist", func() { + Expect(tm.ContainsTestCaseID("123")).To(BeTrue()) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go new file mode 100644 index 00000000..10f89a2e --- /dev/null +++ b/apis/meta/v1alpha1/testplan_types.go @@ -0,0 +1,127 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "knative.dev/pkg/apis" +) + +var TestPlanGVK = GroupVersion.WithKind("TestPlan") +var TestPlanListGVK = GroupVersion.WithKind("TestPlanList") + +// TestPlan object for plugins +type TestPlan struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestPlanSpec `json:"spec"` + + Status TestPlanStatus `json:"status,omitempty"` +} + +// TestPlanSpec spec for TestPlan +type TestPlanSpec struct { + // ID is the test plan id + ID string `json:"id"` + // Assignee is the user assigned to execute the TestPlan + Assignee UserSpec `json:"assignee"` + // CreatedBy is the user who created the TestPlan + CreatedBy UserSpec `json:"createdBy"` + // BuildRefs are the build references related to the TestPlan + BuildRefs []TestObjectRef `json:"buildRefs"` +} + +type TestObjectRef struct { + // Name is the name of the build + Name string `json:"name"` + // ID is the id of the build + ID string `json:"id"` +} + +type TestPlanStatus struct { + // Conditions indicates the latest status of TestPlan within a build + apis.Conditions `json:"conditions"` + // BuildRef is the ref of the last build of a TestPlan + BuildRef *TestObjectRef `json:"buildRef"` + // Executable indicates test cases under the TestPlan could be executed + Executable bool `json:"executable"` + // StartDate is the start date of the TestPlan within a build + StartDate *metav1.Time `json:"startDate,omitempty"` + // EndDate is the deadline of the TestPlan within a build + EndDate *metav1.Time `json:"endDate,omitempty"` + // TestBuildStatus shows the latest test plan status of a build + TestBuildStatus TestBuildStatusInfo `json:"testBuildStatus,omitempty"` +} + +type TestBuildStatusInfo struct { + // TotalCases is the total number of cases + TotalCases int `json:"totalCases"` + // Passed is the number of passed cases + Passed int `json:"passed"` + // Failed is the number of failed cases + Failed int `json:"failed"` + // BLocked is the number of blocked cases + Blocked int `json:"blocked"` + // Waiting is the number of waiting cases + Waiting int `json:"waiting"` + // PassRate is the percentage of passed cases among all cases + PassRate float64 `json:"passRate"` +} + +// TestPlanList list of TestPlans +type TestPlanList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestPlan `json:"items"` +} + +type TestProjectOptions struct { + // Project identity + Project string `json:"project"` + // TestPlanID identity + TestPlanID string `json:"testPlanID"` + // TestCaseID identity + TestCaseID string `json:"testCaseID"` + // BuildID query param + BuildID string `json:"buildID"` + // Search query param for listing + Search string `json:"search"` +} + +func GetRefByIDFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { + if m == nil { + return nil + } + ret, ok := m[ID] + if ok { + return ret + } + return nil +} + +// TestPlanResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestPlanResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testplans", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testplan_types_test.go b/apis/meta/v1alpha1/testplan_types_test.go new file mode 100644 index 00000000..39d12c9a --- /dev/null +++ b/apis/meta/v1alpha1/testplan_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestPlan", func() { + Context("TestPlanResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestPlanResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testplans", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index d3735b29..52fabf7d 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -3006,6 +3006,418 @@ func (in *SortOptions) DeepCopy() *SortOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestBuildStatusInfo) DeepCopyInto(out *TestBuildStatusInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestBuildStatusInfo. +func (in *TestBuildStatusInfo) DeepCopy() *TestBuildStatusInfo { + if in == nil { + return nil + } + out := new(TestBuildStatusInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCase) DeepCopyInto(out *TestCase) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCase. +func (in *TestCase) DeepCopy() *TestCase { + if in == nil { + return nil + } + out := new(TestCase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecution) DeepCopyInto(out *TestCaseExecution) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecution. +func (in *TestCaseExecution) DeepCopy() *TestCaseExecution { + if in == nil { + return nil + } + out := new(TestCaseExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecutionList) DeepCopyInto(out *TestCaseExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestCaseExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecutionList. +func (in *TestCaseExecutionList) DeepCopy() *TestCaseExecutionList { + if in == nil { + return nil + } + out := new(TestCaseExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecutionSpec) DeepCopyInto(out *TestCaseExecutionSpec) { + *out = *in + if in.BuildRef != nil { + in, out := &in.BuildRef, &out.BuildRef + *out = new(TestObjectRef) + **out = **in + } + in.CreatedAt.DeepCopyInto(&out.CreatedAt) + out.CreatedBy = in.CreatedBy +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecutionSpec. +func (in *TestCaseExecutionSpec) DeepCopy() *TestCaseExecutionSpec { + if in == nil { + return nil + } + out := new(TestCaseExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseList) DeepCopyInto(out *TestCaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestCase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseList. +func (in *TestCaseList) DeepCopy() *TestCaseList { + if in == nil { + return nil + } + out := new(TestCaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseRelatedObjectInfo) DeepCopyInto(out *TestCaseRelatedObjectInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseRelatedObjectInfo. +func (in *TestCaseRelatedObjectInfo) DeepCopy() *TestCaseRelatedObjectInfo { + if in == nil { + return nil + } + out := new(TestCaseRelatedObjectInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseSpec) DeepCopyInto(out *TestCaseSpec) { + *out = *in + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]TestCaseStepInfo, len(*in)) + copy(*out, *in) + } + out.CreatedBy = in.CreatedBy + if in.RelatedRequirements != nil { + in, out := &in.RelatedRequirements, &out.RelatedRequirements + *out = make([]TestCaseRelatedObjectInfo, len(*in)) + copy(*out, *in) + } + if in.RelatedBugs != nil { + in, out := &in.RelatedBugs, &out.RelatedBugs + *out = make([]TestCaseRelatedObjectInfo, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseSpec. +func (in *TestCaseSpec) DeepCopy() *TestCaseSpec { + if in == nil { + return nil + } + out := new(TestCaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseStatus) DeepCopyInto(out *TestCaseStatus) { + *out = *in + if in.LastExecution != nil { + in, out := &in.LastExecution, &out.LastExecution + *out = new(TestCaseExecutionSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseStatus. +func (in *TestCaseStatus) DeepCopy() *TestCaseStatus { + if in == nil { + return nil + } + out := new(TestCaseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseStepInfo) DeepCopyInto(out *TestCaseStepInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseStepInfo. +func (in *TestCaseStepInfo) DeepCopy() *TestCaseStepInfo { + if in == nil { + return nil + } + out := new(TestCaseStepInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModule) DeepCopyInto(out *TestModule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModule. +func (in *TestModule) DeepCopy() *TestModule { + if in == nil { + return nil + } + out := new(TestModule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleCaseRef) DeepCopyInto(out *TestModuleCaseRef) { + *out = *in + out.TestObjectRef = in.TestObjectRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleCaseRef. +func (in *TestModuleCaseRef) DeepCopy() *TestModuleCaseRef { + if in == nil { + return nil + } + out := new(TestModuleCaseRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleList) DeepCopyInto(out *TestModuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestModule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleList. +func (in *TestModuleList) DeepCopy() *TestModuleList { + if in == nil { + return nil + } + out := new(TestModuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleSpec) DeepCopyInto(out *TestModuleSpec) { + *out = *in + if in.TestCases != nil { + in, out := &in.TestCases, &out.TestCases + *out = make([]TestModuleCaseRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleSpec. +func (in *TestModuleSpec) DeepCopy() *TestModuleSpec { + if in == nil { + return nil + } + out := new(TestModuleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestObjectRef) DeepCopyInto(out *TestObjectRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestObjectRef. +func (in *TestObjectRef) DeepCopy() *TestObjectRef { + if in == nil { + return nil + } + out := new(TestObjectRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlan) DeepCopyInto(out *TestPlan) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlan. +func (in *TestPlan) DeepCopy() *TestPlan { + if in == nil { + return nil + } + out := new(TestPlan) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanList) DeepCopyInto(out *TestPlanList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestPlan, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanList. +func (in *TestPlanList) DeepCopy() *TestPlanList { + if in == nil { + return nil + } + out := new(TestPlanList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanSpec) DeepCopyInto(out *TestPlanSpec) { + *out = *in + out.Assignee = in.Assignee + out.CreatedBy = in.CreatedBy + if in.BuildRefs != nil { + in, out := &in.BuildRefs, &out.BuildRefs + *out = make([]TestObjectRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanSpec. +func (in *TestPlanSpec) DeepCopy() *TestPlanSpec { + if in == nil { + return nil + } + out := new(TestPlanSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanStatus) DeepCopyInto(out *TestPlanStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apis.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BuildRef != nil { + in, out := &in.BuildRef, &out.BuildRef + *out = new(TestObjectRef) + **out = **in + } + if in.StartDate != nil { + in, out := &in.StartDate, &out.StartDate + *out = (*in).DeepCopy() + } + if in.EndDate != nil { + in, out := &in.EndDate, &out.EndDate + *out = (*in).DeepCopy() + } + out.TestBuildStatus = in.TestBuildStatus +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanStatus. +func (in *TestPlanStatus) DeepCopy() *TestPlanStatus { + if in == nil { + return nil + } + out := new(TestPlanStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestProjectOptions) DeepCopyInto(out *TestProjectOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestProjectOptions. +func (in *TestProjectOptions) DeepCopy() *TestProjectOptions { + if in == nil { + return nil + } + out := new(TestProjectOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TriggeredBy) DeepCopyInto(out *TriggeredBy) { *out = *in diff --git a/go.mod b/go.mod index e8bc45ed..634ba5ac 100644 --- a/go.mod +++ b/go.mod @@ -31,8 +31,6 @@ require ( k8s.io/apimachinery v0.23.9 k8s.io/apiserver v0.23.9 k8s.io/client-go v0.23.9 - k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486 sigs.k8s.io/controller-runtime v0.11.2 sigs.k8s.io/yaml v1.3.0 @@ -103,6 +101,7 @@ require ( go.uber.org/automaxprocs v1.4.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -118,6 +117,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.23.9 // indirect k8s.io/component-base v0.23.9 // indirect + k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect ) diff --git a/go.sum b/go.sum index 5ae6611d..17a4be5e 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,7 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -43,10 +44,12 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -68,9 +71,12 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/jsonschema v0.0.0-20180308105923-f2c93856175a/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -92,11 +98,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= +github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/caarlos0/env/v6 v6.6.2 h1:BypLXDWQTA32rS4UM7pBz+/0BOuvs6C7LSeQAxMwyvI= github.com/caarlos0/env/v6 v6.6.2/go.mod h1:P0BVSgU9zfkxfSpFUs6KsO3uWR4k3Ac0P66ibAGTybM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -104,6 +113,7 @@ github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnd github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -140,21 +150,27 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-gk v0.0.0-20140819190930-201884a44051/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77/go.mod h1:Va5MyIzkU0rAM92tn3hb3Anb7oz7KcnixF49+2wOMe4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful-openapi/v2 v2.3.0 h1:tDgSCzQrkk4N+Isos0zGBYX/GTINjmQuP9BvITbEe38= github.com/emicklei/go-restful-openapi/v2 v2.3.0/go.mod h1:bs67E3SEVgSmB3qDuRLqpS0NcpheqtsCCMhW2/jml1E= github.com/emicklei/go-restful/v3 v3.0.0-rc2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -226,8 +242,11 @@ github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -271,8 +290,18 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= +github.com/gonum/diff v0.0.0-20181124234638-500114f11e71/go.mod h1:22dM4PLscQl+Nzf64qNBurVJvfyvZELT0iRW2l/NN70= +github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= +github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2/go.mod h1:pDgmNM6seYpwvPos3q+zxlXMsbve6mOIPucUnUOrI7Y= +github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= +github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= +github.com/gonum/mathext v0.0.0-20181121095525-8a4bf007ea55/go.mod h1:fmo8aiSEWkJeiGXUJf+sPvuDgEFgqIoZSs843ePKrGg= +github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= +github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= @@ -292,10 +321,13 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -311,6 +343,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -327,6 +360,8 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -369,6 +404,7 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9GkyshztGufsdPQWjH+ifgnIr3xNUL5syI70g2dzU1o= github.com/jarcoal/httpmock v1.0.8 h1:8kI16SoO6LQKgPE7PvQuV+YuD/inwHd7fOOe2zMbo4k= github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -416,10 +452,12 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -437,6 +475,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -468,17 +507,21 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -487,6 +530,7 @@ github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 h1:TVz github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= @@ -494,11 +538,13 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -509,6 +555,7 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -535,6 +582,7 @@ github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -569,6 +617,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8tGiBjZ5YWIc2fzuRpTaz0b/53vT6PEs3QuAWzuU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -582,6 +632,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tsenart/go-tsz v0.0.0-20180814232043-cdeb9e1e981e/go.mod h1:SWZznP1z5Ki7hDT2ioqiFKEse8K9tU2OUvaRI0NeGQo= +github.com/tsenart/vegeta/v12 v12.8.4/go.mod h1:ZiJtwLn/9M4fTPdMY7bdbIeyNeFVE8/AHbWFqCsUuho= github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -599,6 +651,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -616,6 +669,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -652,6 +706,7 @@ go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -661,12 +716,14 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -708,7 +765,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -759,6 +818,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -778,6 +839,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -863,8 +925,13 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -907,6 +974,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -952,7 +1020,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -995,6 +1065,7 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1064,11 +1135,15 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -1153,20 +1228,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= k8s.io/api v0.23.9 h1:v7Ee2CZuyb6rVm1q4bUe7ZonWleLsrvgcOTxPGjQVa4= k8s.io/api v0.23.9/go.mod h1:r4g0GrGdLgwSYB90qgO4tBrbKtALBhUfut+oFt4ikCc= +k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= k8s.io/apiextensions-apiserver v0.23.9 h1:q6X/HhgKo7/Up1p1TeNGNAwqcaBcxaxjxxwXa/5ht+E= k8s.io/apiextensions-apiserver v0.23.9/go.mod h1:uu79PjF1T6YbfFqL5kVTmEdxb40Z0eHM7MfHDHz9dho= +k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.23.9 h1:u9Pu7Ffe+9+QJUemtNjuCwvHSnOUeYEwgSHV+88Ne0g= k8s.io/apimachinery v0.23.9/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/apiserver v0.23.9 h1:SyqC4vrduSS9hkWLHww8kuFL9mVRal798kRHwGHESRM= k8s.io/apiserver v0.23.9/go.mod h1:vIXpgCnHep34bP/y+wGhYdn1NgxAvWtntxfEjst0e74= +k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/client-go v0.23.9 h1:OKxNCL+nhw7UBB5b01OVuAV4Db/AdBdaV6/GYpucuOw= k8s.io/client-go v0.23.9/go.mod h1:sNo0X0MZqo4Uu0qDY5Fl5Y60cJFinBDWWUBOAM5JUCM= +k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/code-generator v0.23.9/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= k8s.io/component-base v0.23.9 h1:YcKppshHzZA7ZG+na+lRdUn/pj+3AMPsp9BaImh2hVo= k8s.io/component-base v0.23.9/go.mod h1:WUNtIRIMd9WBS2r5LCSNZoh6f/Uh+8O+aGuZUG5t428= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1178,8 +1261,10 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +knative.dev/hack v0.0.0-20220725145124-782bbaabb8a1/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486 h1:eWw7LtEIq2GjR9Z5Uw86BlVYyLh50ueJfcXV0SQiMWc= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486/go.mod h1:nBMKMJvyoaJdkpUrjwLVs/DwaP6d73R3UkXK6lblJyE= +pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/plugin/client/interface.go b/plugin/client/interface.go index 6a094977..592ba012 100644 --- a/plugin/client/interface.go +++ b/plugin/client/interface.go @@ -415,3 +415,38 @@ type ProjectUserLister interface { Interface ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, option metav1alpha1.ListOptions) (*metav1alpha1.UserList, error) } + +type TestPlanLister interface { + Interface + ListTestPlans(ctx context.Context, params metav1alpha1.TestProjectOptions, option metav1alpha1.ListOptions) (*metav1alpha1.TestPlanList, error) +} + +type TestPlanGetter interface { + Interface + GetTestPlan(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestPlan, error) +} + +type TestCaseLister interface { + Interface + ListTestCases(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseList, error) +} + +type TestCaseGetter interface { + Interface + GetTestCase(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestCase, error) +} + +type TestModuleLister interface { + Interface + ListTestModules(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestModuleList, error) +} + +type TestCaseExecutionLister interface { + Interface + ListTestCaseExecutions(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseExecutionList, error) +} + +type TestCaseExecutionCreator interface { + Interface + CreateTestCaseExecution(ctx context.Context, params metav1alpha1.TestProjectOptions, payload metav1alpha1.TestCaseExecution) (*metav1alpha1.TestCaseExecution, error) +} diff --git a/plugin/client/plugin_client.go b/plugin/client/plugin_client.go index ea71de3c..a788d67f 100644 --- a/plugin/client/plugin_client.go +++ b/plugin/client/plugin_client.go @@ -401,3 +401,23 @@ func (p *PluginClient) GitRepositoryTag(meta Meta, secret corev1.Secret) ClientG func (p *PluginClient) NewGitRepositoryTag() ClientGitRepositoryTag { return newGitRepositoryTag(p, p.meta, p.secret) } + +// TestPlan get test plan client +func (p *PluginClient) TestPlan(meta Meta, secret corev1.Secret) ClientTestPlan { + return newTestPlan(p, meta, secret) +} + +// TestCase get test case client +func (p *PluginClient) TestCase(meta Meta, secret corev1.Secret) ClientTestCase { + return newTestCase(p, meta, secret) +} + +// TestModule get test module client +func (p *PluginClient) TestModule(meta Meta, secret corev1.Secret) ClientTestModule { + return newTestModule(p, meta, secret) +} + +// TestCaseExecution get test case execution client +func (p *PluginClient) TestCaseExecution(meta Meta, secret corev1.Secret) ClientTestCaseExecution { + return newTestCaseExecution(p, meta, secret) +} diff --git a/plugin/client/testcase.go b/plugin/client/testcase.go new file mode 100644 index 00000000..7fb2aaf7 --- /dev/null +++ b/plugin/client/testcase.go @@ -0,0 +1,74 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestCase interface { + List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) + Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) +} + +type testCase struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestCase(client Client, meta Meta, secret corev1.Secret) ClientTestCase { + return &testCase{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testCase) List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) { + list := &metav1alpha1.TestCaseList{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testCase) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) { + tc := &metav1alpha1.TestCase{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases/%s", params.Project, params.TestPlanID, params.TestCaseID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go new file mode 100644 index 00000000..2a5b993a --- /dev/null +++ b/plugin/client/testcaseexecution.go @@ -0,0 +1,91 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestCaseExecution interface { + List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestCaseExecutionList, error) + Create(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + payload metav1alpha1.TestCaseExecution, + options ...OptionFunc, + ) (*metav1alpha1.TestCaseExecution, error) +} + +type testCaseExecution struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestCaseExecution(client Client, meta Meta, secret corev1.Secret) ClientTestCaseExecution { + return &testCaseExecution{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testCaseExecution) List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestCaseExecutionList, error) { + list := &metav1alpha1.TestCaseExecutionList{} + + uri := fmt.Sprintf( + "projects/%s/testplans/%s/testcases/%s/executions", + params.Project, + params.TestPlanID, + params.TestCaseID, + ) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testCaseExecution) Create(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + payload metav1alpha1.TestCaseExecution, + options ...OptionFunc) (*metav1alpha1.TestCaseExecution, error) { + tc := &metav1alpha1.TestCaseExecution{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases/%s/executions", params.Project, params.TestPlanID, + params.TestCaseID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), BodyOpts(payload), ResultOpts(tc)) + if err := p.client.Post(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/client/testmodule.go b/plugin/client/testmodule.go new file mode 100644 index 00000000..8729b78d --- /dev/null +++ b/plugin/client/testmodule.go @@ -0,0 +1,57 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestModule interface { + List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) +} + +type testModule struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestModule(client Client, meta Meta, secret corev1.Secret) ClientTestModule { + return &testModule{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testModule) List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) { + list := &metav1alpha1.TestModuleList{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testmodules", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} diff --git a/plugin/client/testplan.go b/plugin/client/testplan.go new file mode 100644 index 00000000..53eba0ba --- /dev/null +++ b/plugin/client/testplan.go @@ -0,0 +1,87 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestPlan interface { + List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc, + ) (*metav1alpha1.TestPlanList, error) + + Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestPlan, error) +} + +type testPlan struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestPlan(client Client, meta Meta, secret corev1.Secret) ClientTestPlan { + return &testPlan{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testPlan) List( + ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc, +) (*metav1alpha1.TestPlanList, error) { + list := &metav1alpha1.TestPlanList{} + + uri := fmt.Sprintf("projects/%s/testplans", params.Project) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), + QueryOpts(map[string]string{ + "name": params.Search, + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testPlan) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestPlan, error) { + tc := &metav1alpha1.TestPlan{} + + uri := fmt.Sprintf("projects/%s/testplans/%s", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/route/repository.go b/plugin/route/repository.go index 95a970b7..5b208b0e 100644 --- a/plugin/route/repository.go +++ b/plugin/route/repository.go @@ -31,7 +31,7 @@ type repositoryList struct { tags []string } -//NewRepositoryList create a list repository route with plugin client +// NewRepositoryList create a list repository route with plugin client func NewRepositoryList(impl client.RepositoryLister) Route { return &repositoryList{ tags: []string{"projects", "repositories"}, diff --git a/plugin/route/route.go b/plugin/route/route.go index 75d50075..abce19eb 100644 --- a/plugin/route/route.go +++ b/plugin/route/route.go @@ -226,6 +226,27 @@ func match(c client.Interface) []Route { if v, ok := c.(client.ProjectUserLister); ok { routes = append(routes, NewProjectUserList(v)) } + if v, ok := c.(client.TestPlanLister); ok { + routes = append(routes, NewTestPlanList(v)) + } + if v, ok := c.(client.TestPlanGetter); ok { + routes = append(routes, NewTestPlanGetter(v)) + } + if v, ok := c.(client.TestCaseLister); ok { + routes = append(routes, NewTestCaseLister(v)) + } + if v, ok := c.(client.TestCaseGetter); ok { + routes = append(routes, NewTestCaseGetter(v)) + } + if v, ok := c.(client.TestModuleLister); ok { + routes = append(routes, NewTestModuleLister(v)) + } + if v, ok := c.(client.TestCaseExecutionLister); ok { + routes = append(routes, NewTestCaseExecutionLister(v)) + } + if v, ok := c.(client.TestCaseExecutionCreator); ok { + routes = append(routes, NewTestCaseExecutionCreator(v)) + } return routes } @@ -357,6 +378,28 @@ func GetMethods(c client.Interface) []string { if _, ok := c.(client.ProjectUserLister); ok { methods = append(methods, "ListProjectUsers") } + if _, ok := c.(client.TestPlanLister); ok { + methods = append(methods, "ListTestPlans") + } + if _, ok := c.(client.TestPlanGetter); ok { + methods = append(methods, "GetTestPlan") + } + if _, ok := c.(client.TestCaseLister); ok { + methods = append(methods, "ListTestCases") + } + if _, ok := c.(client.TestCaseGetter); ok { + methods = append(methods, "GetTestCase") + } + if _, ok := c.(client.TestModuleLister); ok { + methods = append(methods, "ListTestModules") + } + if _, ok := c.(client.TestCaseExecutionLister); ok { + methods = append(methods, "ListTestCaseExecutions") + } + if _, ok := c.(client.TestCaseExecutionCreator); ok { + methods = append(methods, "CreateTestCaseExecution") + } + return methods } @@ -397,7 +440,7 @@ func NewDefaultService() *restful.WebService { return ws } -//NewDocService go restful api doc +// NewDocService go restful api doc func NewDocService(webservices ...*restful.WebService) *restful.WebService { config := restfulspec.Config{ WebServices: webservices, diff --git a/plugin/route/testcase.go b/plugin/route/testcase.go new file mode 100644 index 00000000..208a1063 --- /dev/null +++ b/plugin/route/testcase.go @@ -0,0 +1,126 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testCaseLister struct { + impl client.TestCaseLister + tags []string +} + +// NewTestCaseLister creates a list testCase route with plugin client +func NewTestCaseLister(impl client.TestCaseLister) Route { + return &testCaseLister{ + tags: []string{"projects", "testCase"}, + impl: impl, + } +} + +func (r *testCaseLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testCase belong to integraion") + testPlanIDParam := ws.PathParameter("testplanid", "test plan id") + buildIDParam := ws.PathParameter("buildID", "test plan id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases").To(r.ListTestCases). + // docs + Doc("ListTestCases"). + Param(projectParam). + Param(testPlanIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseList{}), + ), + ) +} + +// ListTestCases http handler for list testCase +func (r *testCaseLister) ListTestCases(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + BuildID: request.QueryParameter("buildID"), + } + testCases, err := r.impl.ListTestCases(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCases) +} + +type testCaseGetter struct { + impl client.TestCaseGetter + tags []string +} + +// NewTestCaseGetter creates a list testCase route with plugin client +func NewTestCaseGetter(impl client.TestCaseGetter) Route { + return &testCaseGetter{ + tags: []string{"projects", "testCase"}, + impl: impl, + } +} + +func (r *testCaseGetter) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanIDParam := ws.PathParameter("testplanid", "test plan id") + testCaseIDParam := ws.PathParameter("testcaseid", "test case id") + buildIDParam := ws.QueryParameter("buildID", "test case id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid:*}").To(r.GetTestCase). + // docs + Doc("GetTestCase"). + Param(projectParam). + Param(testPlanIDParam). + Param(testCaseIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCase{}), + ), + ) +} + +// GetTestCase http handler for getting testCase +func (r *testCaseGetter) GetTestCase(request *restful.Request, response *restful.Response) { + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + testCase, err := r.impl.GetTestCase(request.Request.Context(), pathParams) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCase) +} diff --git a/plugin/route/testcaseexecution.go b/plugin/route/testcaseexecution.go new file mode 100644 index 00000000..fa4f0e82 --- /dev/null +++ b/plugin/route/testcaseexecution.go @@ -0,0 +1,135 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testCaseExecutionLister struct { + impl client.TestCaseExecutionLister + tags []string +} + +// NewTestCaseExecutionLister creates a list testCaseExecution route with plugin client +func NewTestCaseExecutionLister(impl client.TestCaseExecutionLister) Route { + return &testCaseExecutionLister{ + tags: []string{"projects", "testCaseExecution"}, + impl: impl, + } +} + +func (r *testCaseExecutionLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanParam := ws.PathParameter("testplanid", "testPlan belong to project") + testCaseParam := ws.PathParameter("testcaseid", "testCase belong to testPlan") + buildParam := ws.QueryParameter("buildID", "build id related to testPlan") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid}/executions").To(r. + ListTestCaseExecutions). + // docs + Doc("ListTestCaseExecutions").Param(projectParam). + Param(testPlanParam). + Param(testCaseParam). + Param(buildParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseExecutionList{}), + ), + ) +} + +// ListTestCaseExecutions http handler for list testCaseExecution +func (r *testCaseExecutionLister) ListTestCaseExecutions(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + testCaseExecutions, err := r.impl.ListTestCaseExecutions(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCaseExecutions) +} + +type testCaseExecutionCreator struct { + impl client.TestCaseExecutionCreator + tags []string +} + +// NewTestCaseExecutionCreator creates a creating testCaseExecution route with plugin client +func NewTestCaseExecutionCreator(impl client.TestCaseExecutionCreator) Route { + return &testCaseExecutionCreator{ + tags: []string{"projects", "testCaseExecution"}, + impl: impl, + } +} + +func (r *testCaseExecutionCreator) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanParam := ws.PathParameter("testplanid", "testPlan belong to project") + testCaseParam := ws.PathParameter("testcaseid", "testCase belong to testPlan") + buildParam := ws.QueryParameter("buildID", "build id related to testPlan") + ws.Route( + ws.POST("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid}/executions"). + To(r.CreateTestCaseExecution). + // docs + Doc("CreateTestCaseExecution"). + Param(projectParam). + Param(testPlanParam). + Param(testCaseParam). + Param(buildParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseExecution{}), + ) +} + +// CreateTestCaseExecution http handler for creating testCaseExecution +func (r *testCaseExecutionCreator) CreateTestCaseExecution(request *restful.Request, response *restful.Response) { + params := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + + var payload metav1alpha1.TestCaseExecution + if err := request.ReadEntity(&payload); err != nil { + kerrors.HandleError(request, response, err) + return + } + + testCaseExecution, err := r.impl.CreateTestCaseExecution(request.Request.Context(), params, payload) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCaseExecution) +} diff --git a/plugin/route/testmodule.go b/plugin/route/testmodule.go new file mode 100644 index 00000000..21305afe --- /dev/null +++ b/plugin/route/testmodule.go @@ -0,0 +1,70 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testModuleLister struct { + impl client.TestModuleLister + tags []string +} + +// NewTestModuleLister creates a list testModule route with plugin client +func NewTestModuleLister(impl client.TestModuleLister) Route { + return &testModuleLister{ + tags: []string{"projects", "testModule"}, + impl: impl, + } +} + +func (r *testModuleLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testModule belong to integraion") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testmodules").To(r.ListTestModules). + // docs + Doc("ListTestModules").Param(projectParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestModuleList{}), + ), + ) +} + +// ListTestModules http handler for list testModule +func (r *testModuleLister) ListTestModules(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + } + testModules, err := r.impl.ListTestModules(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testModules) +} diff --git a/plugin/route/testplan.go b/plugin/route/testplan.go new file mode 100644 index 00000000..7c22a0f9 --- /dev/null +++ b/plugin/route/testplan.go @@ -0,0 +1,115 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testPlanLister struct { + impl client.TestPlanLister + tags []string +} + +// NewTestPlanList creates a list testPlan route with plugin client +func NewTestPlanList(impl client.TestPlanLister) Route { + return &testPlanLister{ + tags: []string{"projects", "testPlan"}, + impl: impl, + } +} + +func (r *testPlanLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testPlan belong to integraion") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans").To(r.ListTestPlans). + // docs + Doc("ListTestPlans").Param(projectParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestPlanList{}), + ), + ) +} + +// ListTestPlans http handler for list testPlan +func (r *testPlanLister) ListTestPlans(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + } + testPlans, err := r.impl.ListTestPlans(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testPlans) +} + +type testPlanGetter struct { + impl client.TestPlanGetter + tags []string +} + +// NewTestPlanGetter creates a list testPlan route with plugin client +func NewTestPlanGetter(impl client.TestPlanGetter) Route { + return &testPlanGetter{ + tags: []string{"projects", "testPlan"}, + impl: impl, + } +} + +func (r *testPlanGetter) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testPlan project belong to integraion") + testPlanIDParam := ws.PathParameter("testPlanID", "test plan id") + buildIDParam := ws.QueryParameter("buildID", "test build id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid}").To(r.GetTestPlan). + // docs + Doc("GetTestCase"). + Param(projectParam). + Param(testPlanIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseList{}), + ), + ) +} + +// GetTestPlan http handler for getting testPlan +func (r *testPlanGetter) GetTestPlan(request *restful.Request, response *restful.Response) { + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + BuildID: request.QueryParameter("buildID"), + } + testPlan, err := r.impl.GetTestPlan(request.Request.Context(), pathParams) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testPlan) +} From 864a63c1056f0a82e6bcfa0584e7946f71302b05 Mon Sep 17 00:00:00 2001 From: jzli Date: Fri, 19 Aug 2022 17:32:28 +0800 Subject: [PATCH 02/13] chore: add annotations --- apis/meta/v1alpha1/testcase_types.go | 8 ++++++++ apis/meta/v1alpha1/testcaseexecution_types.go | 2 ++ apis/meta/v1alpha1/testmodule_types.go | 2 ++ apis/meta/v1alpha1/testplan_types.go | 3 +++ plugin/client/interface.go | 15 +++++++++++---- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apis/meta/v1alpha1/testcase_types.go b/apis/meta/v1alpha1/testcase_types.go index 0cc6af60..b25cd3f3 100644 --- a/apis/meta/v1alpha1/testcase_types.go +++ b/apis/meta/v1alpha1/testcase_types.go @@ -45,15 +45,19 @@ type TestCaseSpec struct { // Steps tell testers how to do to execute this case Steps []TestCaseStepInfo `json:"steps"` // CreatedBy is the user who created the TestCase + // +optional CreatedBy UserSpec `json:"createdBy"` // Priority shows how important this case is Priority string `json:"priority"` // RelatedRequirements is a list of product requirements related to this test case + // +optional RelatedRequirements []TestCaseRelatedObjectInfo `json:"relatedRequirements"` // RelatedBugs is a list of bugs related to this test case + // +optional RelatedBugs []TestCaseRelatedObjectInfo `json:"relatedBugs"` } +// TestCaseStepInfo describes details of TestCaseStep type TestCaseStepInfo struct { // ID is the id of step generated by integration tools ID string `json:"id"` @@ -65,15 +69,19 @@ type TestCaseStepInfo struct { Expect string `json:"expect"` } +// TestCaseRelatedObjectInfo refers to an object related to test case type TestCaseRelatedObjectInfo struct { // Title is the title of related object Title string `json:"title"` // TargetURL is the URL for redirection + // +optional TargetURL string `json:"targetURL"` } +// TestCaseStatus includes status of test case type TestCaseStatus struct { // LastExecution is spec of the latest TestExecution related to the test case + // +optional LastExecution *TestCaseExecutionSpec `json:"lastExecution"` } diff --git a/apis/meta/v1alpha1/testcaseexecution_types.go b/apis/meta/v1alpha1/testcaseexecution_types.go index d4af3b03..53c98df3 100644 --- a/apis/meta/v1alpha1/testcaseexecution_types.go +++ b/apis/meta/v1alpha1/testcaseexecution_types.go @@ -24,6 +24,7 @@ import ( var TestCaseExecutionGVK = GroupVersion.WithKind("TestCaseExecution") var TestCaseExecutionListGVK = GroupVersion.WithKind("TestCaseExecutionList") +// TestCaseExecutionStatus covers possible values of TestcaseExecutionStatus type TestCaseExecutionStatus string // Possible test case execution status below @@ -48,6 +49,7 @@ type TestCaseExecutionSpec struct { TestPlanID string `json:"testPlanId"` // BuildRef refers to the build related to current test case + // +optional BuildRef *TestObjectRef `json:"buildRef"` // Status is the execution result status diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go index 856b4660..a253199a 100644 --- a/apis/meta/v1alpha1/testmodule_types.go +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -41,9 +41,11 @@ type TestModuleSpec struct { // ParentID is the parent module ID ParentID string `json:"parentID"` // TestCases are the cases included by a module + // +optional TestCases []TestModuleCaseRef `json:"testCases"` } +// TestModuleCaseRef refers to a test module and its order type TestModuleCaseRef struct { // TestObjectRef refers to a test case TestObjectRef `json:"ref"` diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go index 10f89a2e..b6e68729 100644 --- a/apis/meta/v1alpha1/testplan_types.go +++ b/apis/meta/v1alpha1/testplan_types.go @@ -47,6 +47,7 @@ type TestPlanSpec struct { BuildRefs []TestObjectRef `json:"buildRefs"` } +// TestObjectRef refers to a test object type TestObjectRef struct { // Name is the name of the build Name string `json:"name"` @@ -54,6 +55,7 @@ type TestObjectRef struct { ID string `json:"id"` } +// TestPlanStatus for test plan status type TestPlanStatus struct { // Conditions indicates the latest status of TestPlan within a build apis.Conditions `json:"conditions"` @@ -69,6 +71,7 @@ type TestPlanStatus struct { TestBuildStatus TestBuildStatusInfo `json:"testBuildStatus,omitempty"` } +// TestBuildStatusInfo for test build status type TestBuildStatusInfo struct { // TotalCases is the total number of cases TotalCases int `json:"totalCases"` diff --git a/plugin/client/interface.go b/plugin/client/interface.go index 592ba012..9b2d0277 100644 --- a/plugin/client/interface.go +++ b/plugin/client/interface.go @@ -155,10 +155,10 @@ type WebhookRegister interface { // TODO: need refactor: maybe integration plugin should decided how to generate cloudevents filters // up to now, it is not a better solution that relying on plugins to give some events type to GitTriggerReconcile. // -// PullRequestCloudEventFilter() CloudEventFilters -// BranchCloudEventFilter() CloudEventFilters -// TagCloudEventFilter() CloudEventFilters -// WebHook() WebHook +// PullRequestCloudEventFilter() CloudEventFilters +// BranchCloudEventFilter() CloudEventFilters +// TagCloudEventFilter() CloudEventFilters +// WebHook() WebHook type GitTriggerRegister interface { GetIntegrationClassName() string @@ -416,36 +416,43 @@ type ProjectUserLister interface { ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, option metav1alpha1.ListOptions) (*metav1alpha1.UserList, error) } +// TestPlanLister list test plans type TestPlanLister interface { Interface ListTestPlans(ctx context.Context, params metav1alpha1.TestProjectOptions, option metav1alpha1.ListOptions) (*metav1alpha1.TestPlanList, error) } +// TestPlanGetter get a test plan type TestPlanGetter interface { Interface GetTestPlan(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestPlan, error) } +// TestCaseLister list test cases type TestCaseLister interface { Interface ListTestCases(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseList, error) } +// TestCaseGetter get a test case type TestCaseGetter interface { Interface GetTestCase(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestCase, error) } +// TestModuleLister list a test module type TestModuleLister interface { Interface ListTestModules(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestModuleList, error) } +// TestCaseExecutionLister list test case executions type TestCaseExecutionLister interface { Interface ListTestCaseExecutions(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseExecutionList, error) } +// TestCaseExecutionCreator create a new test case execution type TestCaseExecutionCreator interface { Interface CreateTestCaseExecution(ctx context.Context, params metav1alpha1.TestProjectOptions, payload metav1alpha1.TestCaseExecution) (*metav1alpha1.TestCaseExecution, error) From c6e84e60ef60f11949bb660926744e89adc8dcfd Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 14:20:32 +0800 Subject: [PATCH 03/13] chore: tidy sum --- go.sum | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/go.sum b/go.sum index 78fe1628..ef4c732f 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,7 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -43,10 +44,12 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -68,9 +71,12 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/jsonschema v0.0.0-20180308105923-f2c93856175a/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -93,11 +99,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= +github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/caarlos0/env/v6 v6.6.2 h1:BypLXDWQTA32rS4UM7pBz+/0BOuvs6C7LSeQAxMwyvI= github.com/caarlos0/env/v6 v6.6.2/go.mod h1:P0BVSgU9zfkxfSpFUs6KsO3uWR4k3Ac0P66ibAGTybM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -105,6 +114,7 @@ github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnd github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -143,21 +153,27 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-gk v0.0.0-20140819190930-201884a44051/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77/go.mod h1:Va5MyIzkU0rAM92tn3hb3Anb7oz7KcnixF49+2wOMe4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful-openapi/v2 v2.3.0 h1:tDgSCzQrkk4N+Isos0zGBYX/GTINjmQuP9BvITbEe38= github.com/emicklei/go-restful-openapi/v2 v2.3.0/go.mod h1:bs67E3SEVgSmB3qDuRLqpS0NcpheqtsCCMhW2/jml1E= github.com/emicklei/go-restful/v3 v3.0.0-rc2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -232,8 +248,11 @@ github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -277,8 +296,18 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= +github.com/gonum/diff v0.0.0-20181124234638-500114f11e71/go.mod h1:22dM4PLscQl+Nzf64qNBurVJvfyvZELT0iRW2l/NN70= +github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= +github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2/go.mod h1:pDgmNM6seYpwvPos3q+zxlXMsbve6mOIPucUnUOrI7Y= +github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= +github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= +github.com/gonum/mathext v0.0.0-20181121095525-8a4bf007ea55/go.mod h1:fmo8aiSEWkJeiGXUJf+sPvuDgEFgqIoZSs843ePKrGg= +github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= +github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= @@ -299,10 +328,13 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -318,6 +350,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -336,6 +369,8 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -381,6 +416,7 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9GkyshztGufsdPQWjH+ifgnIr3xNUL5syI70g2dzU1o= github.com/jarcoal/httpmock v1.0.8 h1:8kI16SoO6LQKgPE7PvQuV+YuD/inwHd7fOOe2zMbo4k= github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -430,6 +466,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -453,6 +490,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -486,17 +524,21 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -505,6 +547,7 @@ github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 h1:TVz github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= @@ -513,11 +556,13 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -528,6 +573,7 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -554,6 +600,7 @@ github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -594,6 +641,8 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8tGiBjZ5YWIc2fzuRpTaz0b/53vT6PEs3QuAWzuU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= @@ -608,6 +657,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tsenart/go-tsz v0.0.0-20180814232043-cdeb9e1e981e/go.mod h1:SWZznP1z5Ki7hDT2ioqiFKEse8K9tU2OUvaRI0NeGQo= +github.com/tsenart/vegeta/v12 v12.8.4/go.mod h1:ZiJtwLn/9M4fTPdMY7bdbIeyNeFVE8/AHbWFqCsUuho= github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -629,6 +680,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -646,6 +698,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -684,6 +737,7 @@ go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -693,12 +747,14 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -740,7 +796,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -792,6 +850,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -811,6 +871,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -897,8 +958,13 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -941,6 +1007,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -986,7 +1053,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1029,6 +1098,7 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1098,11 +1168,15 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1188,23 +1262,31 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= k8s.io/api v0.23.9 h1:v7Ee2CZuyb6rVm1q4bUe7ZonWleLsrvgcOTxPGjQVa4= k8s.io/api v0.23.9/go.mod h1:r4g0GrGdLgwSYB90qgO4tBrbKtALBhUfut+oFt4ikCc= +k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= k8s.io/apiextensions-apiserver v0.23.9 h1:q6X/HhgKo7/Up1p1TeNGNAwqcaBcxaxjxxwXa/5ht+E= k8s.io/apiextensions-apiserver v0.23.9/go.mod h1:uu79PjF1T6YbfFqL5kVTmEdxb40Z0eHM7MfHDHz9dho= +k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.23.9 h1:u9Pu7Ffe+9+QJUemtNjuCwvHSnOUeYEwgSHV+88Ne0g= k8s.io/apimachinery v0.23.9/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/apiserver v0.23.9 h1:SyqC4vrduSS9hkWLHww8kuFL9mVRal798kRHwGHESRM= k8s.io/apiserver v0.23.9/go.mod h1:vIXpgCnHep34bP/y+wGhYdn1NgxAvWtntxfEjst0e74= k8s.io/cli-runtime v0.23.9 h1:9gHvQjL/S87hI7xWUwicIPCnF9CFPCmgBC8rNldozho= k8s.io/cli-runtime v0.23.9/go.mod h1:hDcaaDVGThFtszfsg3tErDQ1k/elaNZjRljz0OWBdBg= +k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/client-go v0.23.9 h1:OKxNCL+nhw7UBB5b01OVuAV4Db/AdBdaV6/GYpucuOw= k8s.io/client-go v0.23.9/go.mod h1:sNo0X0MZqo4Uu0qDY5Fl5Y60cJFinBDWWUBOAM5JUCM= +k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/code-generator v0.23.9/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= k8s.io/component-base v0.23.9 h1:YcKppshHzZA7ZG+na+lRdUn/pj+3AMPsp9BaImh2hVo= k8s.io/component-base v0.23.9/go.mod h1:WUNtIRIMd9WBS2r5LCSNZoh6f/Uh+8O+aGuZUG5t428= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1217,8 +1299,10 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +knative.dev/hack v0.0.0-20220725145124-782bbaabb8a1/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486 h1:eWw7LtEIq2GjR9Z5Uw86BlVYyLh50ueJfcXV0SQiMWc= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486/go.mod h1:nBMKMJvyoaJdkpUrjwLVs/DwaP6d73R3UkXK6lblJyE= +pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= From bea179935886df24fadd39ed1f7114b2438d9456 Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 14:21:54 +0800 Subject: [PATCH 04/13] fix: annotation & naming convention --- apis/data/v1alpha1/zz_generated.deepcopy.go | 2 +- apis/meta/v1alpha1/project_types.go | 6 +++--- apis/meta/v1alpha1/testmodule_types.go | 4 ++-- apis/meta/v1alpha1/testmodule_types_test.go | 2 +- apis/meta/v1alpha1/testplan_types.go | 2 +- apis/meta/v1alpha1/zz_generated.deepcopy.go | 4 ++-- plugin/client/testcase.go | 1 + plugin/client/testcaseexecution.go | 1 + plugin/client/testmodule.go | 1 + plugin/client/testplan.go | 1 + 10 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apis/data/v1alpha1/zz_generated.deepcopy.go b/apis/data/v1alpha1/zz_generated.deepcopy.go index c4210c1d..ff66c0eb 100644 --- a/apis/data/v1alpha1/zz_generated.deepcopy.go +++ b/apis/data/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/apis/meta/v1alpha1/project_types.go b/apis/meta/v1alpha1/project_types.go index a32b5f41..88d81b61 100644 --- a/apis/meta/v1alpha1/project_types.go +++ b/apis/meta/v1alpha1/project_types.go @@ -55,7 +55,7 @@ func (r ProjectSubType) Validate(fld *field.Path) field.ErrorList { MavenRepositoryProjectSubType: {}, RawRepositoryProjectSubType: {}, ProjectManagementSubtype: {}, - TestProjectSubtype: {}, + TestProjectSubType: {}, } if _, exist := supportedTypes[r]; !exist { @@ -87,8 +87,8 @@ const ( // ProjectManagementSubtype project management subtype ProjectManagementSubtype ProjectSubType = "ProjectManagement" - // TestProjectSubtype test project subtype - TestProjectSubtype ProjectSubType = "TestProject" + // TestProjectSubType test project subtype + TestProjectSubType ProjectSubType = "TestProject" // TODO: add more subtypes ) diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go index a253199a..d811bca0 100644 --- a/apis/meta/v1alpha1/testmodule_types.go +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -48,7 +48,7 @@ type TestModuleSpec struct { // TestModuleCaseRef refers to a test module and its order type TestModuleCaseRef struct { // TestObjectRef refers to a test case - TestObjectRef `json:"ref"` + TestCase TestObjectRef `json:"ref"` // Order indicates the ASC order of the object at same level Order int `json:"order"` } @@ -77,7 +77,7 @@ func (tm *TestModule) ContainsTestCaseID(caseID string) bool { } for _, tc := range tm.Spec.TestCases { - if tc.ID == caseID { + if tc.TestCase.ID == caseID { return true } } diff --git a/apis/meta/v1alpha1/testmodule_types_test.go b/apis/meta/v1alpha1/testmodule_types_test.go index 4ad6a816..dee4c333 100644 --- a/apis/meta/v1alpha1/testmodule_types_test.go +++ b/apis/meta/v1alpha1/testmodule_types_test.go @@ -38,7 +38,7 @@ var _ = Describe("TestModule", func() { tm := TestModule{Spec: TestModuleSpec{ TestCases: []TestModuleCaseRef{ { - TestObjectRef: TestObjectRef{ID: "123", Name: "abc"}, + TestCase: TestObjectRef{ID: "123", Name: "abc"}, }, }, }} diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go index b6e68729..1993da97 100644 --- a/apis/meta/v1alpha1/testplan_types.go +++ b/apis/meta/v1alpha1/testplan_types.go @@ -108,7 +108,7 @@ type TestProjectOptions struct { Search string `json:"search"` } -func GetRefByIDFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { +func RefFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { if m == nil { return nil } diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index 52fabf7d..39e1d705 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/rbac/v1" + "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/runtime" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -3230,7 +3230,7 @@ func (in *TestModule) DeepCopy() *TestModule { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestModuleCaseRef) DeepCopyInto(out *TestModuleCaseRef) { *out = *in - out.TestObjectRef = in.TestObjectRef + out.TestCase = in.TestCase } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleCaseRef. diff --git a/plugin/client/testcase.go b/plugin/client/testcase.go index 7fb2aaf7..b51771e1 100644 --- a/plugin/client/testcase.go +++ b/plugin/client/testcase.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestCase for test case type ClientTestCase interface { List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go index 2a5b993a..5cb5cdec 100644 --- a/plugin/client/testcaseexecution.go +++ b/plugin/client/testcaseexecution.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestCaseExecution client for test case execution type ClientTestCaseExecution interface { List(ctx context.Context, baseURL *duckv1.Addressable, diff --git a/plugin/client/testmodule.go b/plugin/client/testmodule.go index 8729b78d..36f24c95 100644 --- a/plugin/client/testmodule.go +++ b/plugin/client/testmodule.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestModule client for test module type ClientTestModule interface { List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) } diff --git a/plugin/client/testplan.go b/plugin/client/testplan.go index 53eba0ba..4a7fb47b 100644 --- a/plugin/client/testplan.go +++ b/plugin/client/testplan.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestPlan client for test plan type ClientTestPlan interface { List(ctx context.Context, baseURL *duckv1.Addressable, From 1a995efbb262c31fe26fc7d3f3044fc8380c5c95 Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 16:55:08 +0800 Subject: [PATCH 05/13] fix: test coverage --- plugin/client/client_suite_test.go | 20 ++++ plugin/client/plugin_options_test.go | 27 ++--- plugin/client/testcase_test.go | 86 ++++++++++++++++ plugin/client/testcaseexecution.go | 4 +- plugin/client/testcaseexecution_test.go | 99 +++++++++++++++++++ plugin/client/testdata/fixtures/testcase.json | 79 +++++++++++++++ .../testdata/fixtures/testcaseexecution.json | 22 +++++ .../testdata/fixtures/testcaseexecutions.json | 87 ++++++++++++++++ .../client/testdata/fixtures/testcases.json | 37 +++++++ .../client/testdata/fixtures/testmodules.json | 29 ++++++ plugin/client/testdata/fixtures/testplan.json | 42 ++++++++ .../client/testdata/fixtures/testplans.json | 51 ++++++++++ plugin/client/testmodule_test.go | 66 +++++++++++++ plugin/client/testplan_test.go | 84 ++++++++++++++++ 14 files changed, 721 insertions(+), 12 deletions(-) create mode 100644 plugin/client/testcase_test.go create mode 100644 plugin/client/testcaseexecution_test.go create mode 100644 plugin/client/testdata/fixtures/testcase.json create mode 100644 plugin/client/testdata/fixtures/testcaseexecution.json create mode 100644 plugin/client/testdata/fixtures/testcaseexecutions.json create mode 100644 plugin/client/testdata/fixtures/testcases.json create mode 100644 plugin/client/testdata/fixtures/testmodules.json create mode 100644 plugin/client/testdata/fixtures/testplan.json create mode 100644 plugin/client/testdata/fixtures/testplans.json create mode 100644 plugin/client/testmodule_test.go create mode 100644 plugin/client/testplan_test.go diff --git a/plugin/client/client_suite_test.go b/plugin/client/client_suite_test.go index 16270aca..d106f51a 100644 --- a/plugin/client/client_suite_test.go +++ b/plugin/client/client_suite_test.go @@ -19,11 +19,31 @@ package client import ( "testing" + "github.com/go-resty/resty/v2" + "github.com/jarcoal/httpmock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) +var defaultClient *resty.Client + func TestClient(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Client Suite") } + +var _ = BeforeSuite(func() { + defaultClient = resty.New() + defaultClient.SetDebug(true) + // block all HTTP requests + httpmock.ActivateNonDefault(defaultClient.GetClient()) +}) + +var _ = BeforeEach(func() { + // remove any mocks + httpmock.Reset() +}) + +var _ = AfterSuite(func() { + httpmock.DeactivateAndReset() +}) diff --git a/plugin/client/plugin_options_test.go b/plugin/client/plugin_options_test.go index 9667b9f9..a8f8840a 100644 --- a/plugin/client/plugin_options_test.go +++ b/plugin/client/plugin_options_test.go @@ -33,17 +33,7 @@ import ( ) func TestSecretOpts(t *testing.T) { - secretData := map[string][]byte{ - "username": []byte("123"), - "password": []byte("456"), - } - - secret := v1.Secret{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{}, - Type: v1.SecretTypeBasicAuth, - Data: secretData, - } + secret := secretForTest() opt := SecretOpts(secret) request := resty.New().R() @@ -97,6 +87,21 @@ func TestSecretOptsWithRealFile(t *testing.T) { g.Expect(request.Header.Get(PluginSecretHeader)).To(Equal(base64.StdEncoding.EncodeToString(dataBytes))) } +func secretForTest() v1.Secret { + secretData := map[string][]byte{ + "username": []byte("123"), + "password": []byte("456"), + } + + secret := v1.Secret{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{}, + Type: v1.SecretTypeBasicAuth, + Data: secretData, + } + return secret +} + func parseSecret(path string) v1.Secret { filename, err := filepath.Abs(path) if err != nil { diff --git a/plugin/client/testcase_test.go b/plugin/client/testcase_test.go new file mode 100644 index 00000000..d7fb41b1 --- /dev/null +++ b/plugin/client/testcase_test.go @@ -0,0 +1,86 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestCase", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestCases", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testcases.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestCase(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + + Describe("Get TestCase", func() { + It("returns a test case detail", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File("testdata/fixtures/testcase.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.TestCaseID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + testCase, err := pluginClient.TestCase(meta, secret).Get(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(testCase.Spec.ID).To(Equal("ACP-82296")) + }) + }) +}) diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go index 5cb5cdec..279fbe70 100644 --- a/plugin/client/testcaseexecution.go +++ b/plugin/client/testcaseexecution.go @@ -66,7 +66,9 @@ func (p *testCaseExecution) List(ctx context.Context, params.TestPlanID, params.TestCaseID, ) - options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { return nil, err } diff --git a/plugin/client/testcaseexecution_test.go b/plugin/client/testcaseexecution_test.go new file mode 100644 index 00000000..b6a8b677 --- /dev/null +++ b/plugin/client/testcaseexecution_test.go @@ -0,0 +1,99 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestCaseExecution", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestCaseExecutions", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testcaseexecutions.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s/executions?buildID=%s", meta.BaseURL, + opt.Project, + opt.TestPlanID, + opt.TestCaseID, + opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestCaseExecution(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(4)) + }) + }) + + Describe("Post TestCaseExecution", func() { + It("creates a test case execution", func() { + responder := httpmock.NewJsonResponderOrPanic( + 200, httpmock.File("testdata/fixtures/testcaseexecution.json"), + ) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s/executions", meta.BaseURL, + opt.Project, + opt.TestPlanID, opt.TestCaseID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("POST", fakeUrl, responder) + execution, err := pluginClient.TestCaseExecution(meta, secret). + Create(ctx, &duckv1.Addressable{URL: url}, opt, + v1alpha1.TestCaseExecution{ + Spec: v1alpha1.TestCaseExecutionSpec{ + Status: v1alpha1.TestcaseExecutionStatusPassed, + }, + }) + Expect(err).To(BeNil()) + Expect(execution.Spec.Status).To(Equal(v1alpha1.TestcaseExecutionStatusPassed)) + }) + }) +}) diff --git a/plugin/client/testdata/fixtures/testcase.json b/plugin/client/testdata/fixtures/testcase.json new file mode 100644 index 00000000..52f45596 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcase.json @@ -0,0 +1,79 @@ +{ + "kind": "TestCase", + "apiVersion": "v1alpha1", + "metadata": { + "name": "验证拓扑图内按钮操作正确", + "creationTimestamp": "2022-06-14T01:49:23Z" + }, + "spec": { + "id": "ACP-82296", + "type": "手工", + "prerequisite": "", + "steps": [ + { + "id": "533916", + "description": "\u003cp\u003e点击图例下拉框,查看内容与颜色对应关系\u003c/p\u003e\n", + "order": "1", + "expect": "\u003cp\u003e1.关联关系:橙色\u003c/p\u003e\n\n\u003cp\u003e2.所属关系:灰色\u003c/p\u003e\n\n\u003cp\u003e3.挂载关系:蓝色\u003c/p\u003e\n\n\u003cp\u003e4.引用关系:紫色\u003c/p\u003e\n\n\u003cp\u003e5.挂载和引用关系:绿色\u003c/p\u003e\n" + }, + { + "id": "533917", + "description": "\u003cp\u003e点击刷新按钮\u003c/p\u003e\n", + "order": "2", + "expect": "\u003cp\u003e界面有loading效果\u003c/p\u003e\n" + }, + { + "id": "533918", + "description": "\u003cp\u003e点击全景视图按钮\u003c/p\u003e\n", + "order": "3", + "expect": "\u003cp\u003e当前拓扑图中的所有卡片,上下左右居中显示\u003c/p\u003e\n" + }, + { + "id": "533919", + "description": "\u003cp\u003e点击放大按钮\u003c/p\u003e\n", + "order": "4", + "expect": "\u003cp\u003e默认为100%,每次点击放大后缩放比例加10%,拓扑图放大\u003c/p\u003e\n" + }, + { + "id": "533920", + "description": "\u003cp\u003e点击缩小按钮\u003c/p\u003e\n", + "order": "5", + "expect": "\u003cp\u003e默认为100%,每次点击后缩放比例减10%,拓扑图缩小\u003c/p\u003e\n" + }, + { + "id": "533921", + "description": "\u003cp\u003e当缩放比例不为100%时,点击1:1\u003c/p\u003e\n", + "order": "6", + "expect": "\u003cp\u003e缩放比例还原到100%,拓扑图恢复到最初大小\u003c/p\u003e\n" + } + ], + "createdBy": { + "id": "36", + "name": "myliu" + }, + "priority": "高", + "relatedRequirements": [ + { + "title": "REQ-5112", + "targetURL": "" + } + ], + "relatedBugs": [] + }, + "status": { + "lastExecution": { + "testPlanId": "387013", + "buildRef": { + "name": "回归测试", + "id": "1140" + }, + "status": "passed", + "createdAt": "2022-08-18T07:50:39Z", + "createdBy": { + "id": "45", + "name": "admin", + "email": "admin@cpaas.io" + } + } + } +} diff --git a/plugin/client/testdata/fixtures/testcaseexecution.json b/plugin/client/testdata/fixtures/testcaseexecution.json new file mode 100644 index 00000000..83f0f2d3 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcaseexecution.json @@ -0,0 +1,22 @@ +{ + "kind": "TestCaseExecution", + "apiVersion": "meta.katanomi.dev/v1alpha1", + "metadata": { + "name": "464488", + "namespace": "devops", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "", + "buildRef": { + "name": "", + "id": "1140" + }, + "status": "passed", + "createdAt": null, + "createdBy": { + "name": "admin", + "email": "admin@cpaas.io" + } + } +} diff --git a/plugin/client/testdata/fixtures/testcaseexecutions.json b/plugin/client/testdata/fixtures/testcaseexecutions.json new file mode 100644 index 00000000..07f1239f --- /dev/null +++ b/plugin/client/testdata/fixtures/testcaseexecutions.json @@ -0,0 +1,87 @@ +{ + "metadata": { + "totalItems": 4 + }, + "items": [ + { + "metadata": { + "name": "24", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "passed", + "createdAt": "2022-08-18T10:23:52Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "23", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "failed", + "createdAt": "2022-08-18T10:23:42Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "22", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "blocked", + "createdAt": "2022-08-18T10:23:11Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "21", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "failed", + "createdAt": "2022-08-18T10:22:59Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + } + ] +} \ No newline at end of file diff --git a/plugin/client/testdata/fixtures/testcases.json b/plugin/client/testdata/fixtures/testcases.json new file mode 100644 index 00000000..4b55a770 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcases.json @@ -0,0 +1,37 @@ +{ + "metadata": { + "totalItems": 1 + }, + "items": [ + { + "kind": "TestCase", + "apiVersion": "v1alpha1", + "metadata": { + "name": "testcase1", + "creationTimestamp": null + }, + "spec": { + "id": "t2-1", + "type": "", + "prerequisite": "", + "steps": null, + "createdBy": {}, + "priority": "", + "relatedRequirements": null, + "relatedBugs": null + }, + "status": { + "lastExecution": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "passed", + "createdAt": null, + "createdBy": {} + } + } + } + ] +} diff --git a/plugin/client/testdata/fixtures/testmodules.json b/plugin/client/testdata/fixtures/testmodules.json new file mode 100644 index 00000000..96f24f1d --- /dev/null +++ b/plugin/client/testdata/fixtures/testmodules.json @@ -0,0 +1,29 @@ +{ + "metadata": { + "totalItems": 1 + }, + "items": [ + { + "kind": "TestModule", + "apiVersion": "v1alpha1", + "metadata": { + "name": "topsuite", + "creationTimestamp": null + }, + "spec": { + "id": "33", + "order": 1, + "parentID": "", + "testCases": [ + { + "ref": { + "name": "testcase1", + "id": "t2-1" + }, + "order": 1000 + } + ] + } + } + ] +} diff --git a/plugin/client/testdata/fixtures/testplan.json b/plugin/client/testdata/fixtures/testplan.json new file mode 100644 index 00000000..43b4ba76 --- /dev/null +++ b/plugin/client/testdata/fixtures/testplan.json @@ -0,0 +1,42 @@ +{ + "kind": "TestPlan", + "apiVersion": "v1alpha1", + "metadata": { + "name": "12.6asm交付-回归测试", + "creationTimestamp": null + }, + "spec": { + "id": "387013", + "assignee": {}, + "createdBy": {}, + "buildRefs": [ + { + "name": "回归测试", + "id": "1140" + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": null, + "reason": "Running" + } + ], + "buildRef": { + "name": "回归测试", + "id": "1140" + }, + "executable": true, + "testBuildStatus": { + "totalCases": 107, + "passed": 88, + "failed": 0, + "blocked": 1, + "waiting": 18, + "passRate": 0.822429906542056 + } + } +} diff --git a/plugin/client/testdata/fixtures/testplans.json b/plugin/client/testdata/fixtures/testplans.json new file mode 100644 index 00000000..fa872719 --- /dev/null +++ b/plugin/client/testdata/fixtures/testplans.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "totalItems": 1, + "page": 1, + "itemsPerPage": 20 + }, + "items": [ + { + "kind": "TestPlan", + "apiVersion": "v1alpha1", + "metadata": { + "name": "testplan1", + "creationTimestamp": null + }, + "spec": { + "id": "36", + "assignee": {}, + "createdBy": {}, + "buildRefs": [ + { + "name": "test2version1", + "id": "11" + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": null, + "reason": "Succeeded" + } + ], + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "executable": true, + "testBuildStatus": { + "totalCases": 1, + "passed": 1, + "failed": 0, + "blocked": 0, + "waiting": 0, + "passRate": 1 + } + } + } + ] +} \ No newline at end of file diff --git a/plugin/client/testmodule_test.go b/plugin/client/testmodule_test.go new file mode 100644 index 00000000..2bd0d0eb --- /dev/null +++ b/plugin/client/testmodule_test.go @@ -0,0 +1,66 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestModules", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestModules", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testmodules.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testmodules", meta.BaseURL, opt.Project, + opt.TestPlanID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestModule(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + +}) diff --git a/plugin/client/testplan_test.go b/plugin/client/testplan_test.go new file mode 100644 index 00000000..f09dd914 --- /dev/null +++ b/plugin/client/testplan_test.go @@ -0,0 +1,84 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestPlan", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestPlans", func() { + It("returns a list of test plans", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testplans.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans", meta.BaseURL, opt.Project) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestPlan(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + + Describe("Get TestPlan", func() { + It("returns a test plan detail", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File("testdata/fixtures/testplan.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "387013", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + testPlan, err := pluginClient.TestPlan(meta, secret).Get(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(testPlan.Spec.ID).To(Equal("387013")) + }) + }) +}) From 442e14b68c9ee4a4d631800cf7ce8e9f57848a9c Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 17:02:31 +0800 Subject: [PATCH 06/13] fix: reviewdog issue --- plugin/client/testdata/fixtures/testcaseexecutions.json | 2 +- plugin/client/testdata/fixtures/testplans.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/client/testdata/fixtures/testcaseexecutions.json b/plugin/client/testdata/fixtures/testcaseexecutions.json index 07f1239f..be0282c9 100644 --- a/plugin/client/testdata/fixtures/testcaseexecutions.json +++ b/plugin/client/testdata/fixtures/testcaseexecutions.json @@ -84,4 +84,4 @@ } } ] -} \ No newline at end of file +} diff --git a/plugin/client/testdata/fixtures/testplans.json b/plugin/client/testdata/fixtures/testplans.json index fa872719..b8947f3c 100644 --- a/plugin/client/testdata/fixtures/testplans.json +++ b/plugin/client/testdata/fixtures/testplans.json @@ -48,4 +48,4 @@ } } ] -} \ No newline at end of file +} From 2383a224d8fd2c81c18827cb2d39ea93ff482436 Mon Sep 17 00:00:00 2001 From: jzli Date: Fri, 19 Aug 2022 15:35:23 +0800 Subject: [PATCH 07/13] feat: test management --- apis/meta/v1alpha1/project_types.go | 4 + apis/meta/v1alpha1/testcase_types.go | 96 ++++ apis/meta/v1alpha1/testcase_types_test.go | 36 ++ apis/meta/v1alpha1/testcaseexecution_types.go | 79 ++++ .../v1alpha1/testcaseexecution_types_test.go | 36 ++ apis/meta/v1alpha1/testmodule_types.go | 83 ++++ apis/meta/v1alpha1/testmodule_types_test.go | 53 +++ apis/meta/v1alpha1/testplan_types.go | 127 ++++++ apis/meta/v1alpha1/testplan_types_test.go | 36 ++ apis/meta/v1alpha1/zz_generated.deepcopy.go | 412 ++++++++++++++++++ go.mod | 5 +- go.sum | 86 +++- plugin/client/interface.go | 35 ++ plugin/client/plugin_client.go | 20 + plugin/client/testcase.go | 74 ++++ plugin/client/testcaseexecution.go | 91 ++++ plugin/client/testmodule.go | 57 +++ plugin/client/testplan.go | 87 ++++ plugin/route/repository.go | 2 +- plugin/route/route.go | 45 +- plugin/route/testcase.go | 126 ++++++ plugin/route/testcaseexecution.go | 135 ++++++ plugin/route/testmodule.go | 70 +++ plugin/route/testplan.go | 115 +++++ 24 files changed, 1905 insertions(+), 5 deletions(-) create mode 100644 apis/meta/v1alpha1/testcase_types.go create mode 100644 apis/meta/v1alpha1/testcase_types_test.go create mode 100644 apis/meta/v1alpha1/testcaseexecution_types.go create mode 100644 apis/meta/v1alpha1/testcaseexecution_types_test.go create mode 100644 apis/meta/v1alpha1/testmodule_types.go create mode 100644 apis/meta/v1alpha1/testmodule_types_test.go create mode 100644 apis/meta/v1alpha1/testplan_types.go create mode 100644 apis/meta/v1alpha1/testplan_types_test.go create mode 100644 plugin/client/testcase.go create mode 100644 plugin/client/testcaseexecution.go create mode 100644 plugin/client/testmodule.go create mode 100644 plugin/client/testplan.go create mode 100644 plugin/route/testcase.go create mode 100644 plugin/route/testcaseexecution.go create mode 100644 plugin/route/testmodule.go create mode 100644 plugin/route/testplan.go diff --git a/apis/meta/v1alpha1/project_types.go b/apis/meta/v1alpha1/project_types.go index a64078ce..a32b5f41 100644 --- a/apis/meta/v1alpha1/project_types.go +++ b/apis/meta/v1alpha1/project_types.go @@ -55,6 +55,7 @@ func (r ProjectSubType) Validate(fld *field.Path) field.ErrorList { MavenRepositoryProjectSubType: {}, RawRepositoryProjectSubType: {}, ProjectManagementSubtype: {}, + TestProjectSubtype: {}, } if _, exist := supportedTypes[r]; !exist { @@ -86,6 +87,9 @@ const ( // ProjectManagementSubtype project management subtype ProjectManagementSubtype ProjectSubType = "ProjectManagement" + // TestProjectSubtype test project subtype + TestProjectSubtype ProjectSubType = "TestProject" + // TODO: add more subtypes ) diff --git a/apis/meta/v1alpha1/testcase_types.go b/apis/meta/v1alpha1/testcase_types.go new file mode 100644 index 00000000..0cc6af60 --- /dev/null +++ b/apis/meta/v1alpha1/testcase_types.go @@ -0,0 +1,96 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestCaseGVK = GroupVersion.WithKind("TestCase") +var TestCaseListGVK = GroupVersion.WithKind("TestCaseList") + +// TestCase object for plugins +type TestCase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestCaseSpec `json:"spec"` + + Status TestCaseStatus `json:"status,omitempty"` +} + +// TestCaseSpec spec for TestCase +type TestCaseSpec struct { + // ID is the test plan id + ID string `json:"id"` + // Type is the type description from integration tools + Type string `json:"type"` + // Prerequisite are the preparations before executing the testcase steps + Prerequisite string `json:"prerequisite"` + // Steps tell testers how to do to execute this case + Steps []TestCaseStepInfo `json:"steps"` + // CreatedBy is the user who created the TestCase + CreatedBy UserSpec `json:"createdBy"` + // Priority shows how important this case is + Priority string `json:"priority"` + // RelatedRequirements is a list of product requirements related to this test case + RelatedRequirements []TestCaseRelatedObjectInfo `json:"relatedRequirements"` + // RelatedBugs is a list of bugs related to this test case + RelatedBugs []TestCaseRelatedObjectInfo `json:"relatedBugs"` +} + +type TestCaseStepInfo struct { + // ID is the id of step generated by integration tools + ID string `json:"id"` + // Description shows how to run this step + Description string `json:"description"` + // Order shows the order of step + Order string `json:"order"` + // Expect shows the expected output after running this step + Expect string `json:"expect"` +} + +type TestCaseRelatedObjectInfo struct { + // Title is the title of related object + Title string `json:"title"` + // TargetURL is the URL for redirection + TargetURL string `json:"targetURL"` +} + +type TestCaseStatus struct { + // LastExecution is spec of the latest TestExecution related to the test case + LastExecution *TestCaseExecutionSpec `json:"lastExecution"` +} + +// TestCaseList list of TestCases +type TestCaseList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestCase `json:"items"` +} + +// TestCaseResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestCaseResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcases", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testcase_types_test.go b/apis/meta/v1alpha1/testcase_types_test.go new file mode 100644 index 00000000..a0cf30d4 --- /dev/null +++ b/apis/meta/v1alpha1/testcase_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestCaseType", func() { + Context("TestCaseResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestCaseResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcases", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testcaseexecution_types.go b/apis/meta/v1alpha1/testcaseexecution_types.go new file mode 100644 index 00000000..d4af3b03 --- /dev/null +++ b/apis/meta/v1alpha1/testcaseexecution_types.go @@ -0,0 +1,79 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestCaseExecutionGVK = GroupVersion.WithKind("TestCaseExecution") +var TestCaseExecutionListGVK = GroupVersion.WithKind("TestCaseExecutionList") + +type TestCaseExecutionStatus string + +// Possible test case execution status below +const ( + TestcaseExecutionStatusPassed TestCaseExecutionStatus = "passed" + TestcaseExecutionStatusFailed TestCaseExecutionStatus = "failed" + TestcaseExecutionStatusBlocked TestCaseExecutionStatus = "blocked" + TestcaseExecutionStatusWaiting TestCaseExecutionStatus = "waiting" +) + +// TestCaseExecution object for plugins +type TestCaseExecution struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestCaseExecutionSpec `json:"spec"` +} + +// TestCaseExecutionSpec spec for TestCaseExecution +type TestCaseExecutionSpec struct { + // TestPlanID refers to the test plan including current test case + TestPlanID string `json:"testPlanId"` + + // BuildRef refers to the build related to current test case + BuildRef *TestObjectRef `json:"buildRef"` + + // Status is the execution result status + Status TestCaseExecutionStatus `json:"status"` + + // CreatedAt is the time when test case was executed + CreatedAt metav1.Time `json:"createdAt"` + + // CreatedBy is the user who created the TestCaseExecution + CreatedBy UserSpec `json:"createdBy,omitempty"` +} + +// TestCaseExecutionList list of TestCaseExecutions +type TestCaseExecutionList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestCaseExecution `json:"items"` +} + +// TestCaseExecutionResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestCaseExecutionResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcaseexecutions", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testcaseexecution_types_test.go b/apis/meta/v1alpha1/testcaseexecution_types_test.go new file mode 100644 index 00000000..3c4b0e1f --- /dev/null +++ b/apis/meta/v1alpha1/testcaseexecution_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestCaseExecution", func() { + Context("TestCaseExecutionResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestCaseExecutionResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testcaseexecutions", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go new file mode 100644 index 00000000..856b4660 --- /dev/null +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var TestModuleGVK = GroupVersion.WithKind("TestModule") +var TestModuleListGVK = GroupVersion.WithKind("TestModuleList") + +// TestModule object for plugins +type TestModule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestModuleSpec `json:"spec"` +} + +// TestModuleSpec spec for TestModule +type TestModuleSpec struct { + // ID is the test module id + ID string `json:"id"` + // Order is used to sort modules by ASC order + Order int `json:"order"` + // ParentID is the parent module ID + ParentID string `json:"parentID"` + // TestCases are the cases included by a module + TestCases []TestModuleCaseRef `json:"testCases"` +} + +type TestModuleCaseRef struct { + // TestObjectRef refers to a test case + TestObjectRef `json:"ref"` + // Order indicates the ASC order of the object at same level + Order int `json:"order"` +} + +// TestModuleList list of TestModules +type TestModuleList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestModule `json:"items"` +} + +// TestModuleResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestModuleResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testmodules", + Verb: verb, + } +} + +func (tm *TestModule) ContainsTestCaseID(caseID string) bool { + if tm == nil || tm.Spec.TestCases == nil { + return false + } + + for _, tc := range tm.Spec.TestCases { + if tc.ID == caseID { + return true + } + } + return false +} diff --git a/apis/meta/v1alpha1/testmodule_types_test.go b/apis/meta/v1alpha1/testmodule_types_test.go new file mode 100644 index 00000000..4ad6a816 --- /dev/null +++ b/apis/meta/v1alpha1/testmodule_types_test.go @@ -0,0 +1,53 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestModule", func() { + Context("TestModuleResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestModuleResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testmodules", + Verb: "get", + })) + }) + }) + + Context("ContainsTestCaseID", func() { + tm := TestModule{Spec: TestModuleSpec{ + TestCases: []TestModuleCaseRef{ + { + TestObjectRef: TestObjectRef{ID: "123", Name: "abc"}, + }, + }, + }} + It("returns false if not exist", func() { + Expect(tm.ContainsTestCaseID("456")).To(BeFalse()) + }) + + It("returns true if exist", func() { + Expect(tm.ContainsTestCaseID("123")).To(BeTrue()) + }) + }) +}) diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go new file mode 100644 index 00000000..10f89a2e --- /dev/null +++ b/apis/meta/v1alpha1/testplan_types.go @@ -0,0 +1,127 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "knative.dev/pkg/apis" +) + +var TestPlanGVK = GroupVersion.WithKind("TestPlan") +var TestPlanListGVK = GroupVersion.WithKind("TestPlanList") + +// TestPlan object for plugins +type TestPlan struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestPlanSpec `json:"spec"` + + Status TestPlanStatus `json:"status,omitempty"` +} + +// TestPlanSpec spec for TestPlan +type TestPlanSpec struct { + // ID is the test plan id + ID string `json:"id"` + // Assignee is the user assigned to execute the TestPlan + Assignee UserSpec `json:"assignee"` + // CreatedBy is the user who created the TestPlan + CreatedBy UserSpec `json:"createdBy"` + // BuildRefs are the build references related to the TestPlan + BuildRefs []TestObjectRef `json:"buildRefs"` +} + +type TestObjectRef struct { + // Name is the name of the build + Name string `json:"name"` + // ID is the id of the build + ID string `json:"id"` +} + +type TestPlanStatus struct { + // Conditions indicates the latest status of TestPlan within a build + apis.Conditions `json:"conditions"` + // BuildRef is the ref of the last build of a TestPlan + BuildRef *TestObjectRef `json:"buildRef"` + // Executable indicates test cases under the TestPlan could be executed + Executable bool `json:"executable"` + // StartDate is the start date of the TestPlan within a build + StartDate *metav1.Time `json:"startDate,omitempty"` + // EndDate is the deadline of the TestPlan within a build + EndDate *metav1.Time `json:"endDate,omitempty"` + // TestBuildStatus shows the latest test plan status of a build + TestBuildStatus TestBuildStatusInfo `json:"testBuildStatus,omitempty"` +} + +type TestBuildStatusInfo struct { + // TotalCases is the total number of cases + TotalCases int `json:"totalCases"` + // Passed is the number of passed cases + Passed int `json:"passed"` + // Failed is the number of failed cases + Failed int `json:"failed"` + // BLocked is the number of blocked cases + Blocked int `json:"blocked"` + // Waiting is the number of waiting cases + Waiting int `json:"waiting"` + // PassRate is the percentage of passed cases among all cases + PassRate float64 `json:"passRate"` +} + +// TestPlanList list of TestPlans +type TestPlanList struct { + metav1.TypeMeta `json:",inline"` + ListMeta `json:"metadata,omitempty"` + + Items []TestPlan `json:"items"` +} + +type TestProjectOptions struct { + // Project identity + Project string `json:"project"` + // TestPlanID identity + TestPlanID string `json:"testPlanID"` + // TestCaseID identity + TestCaseID string `json:"testCaseID"` + // BuildID query param + BuildID string `json:"buildID"` + // Search query param for listing + Search string `json:"search"` +} + +func GetRefByIDFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { + if m == nil { + return nil + } + ret, ok := m[ID] + if ok { + return ret + } + return nil +} + +// TestPlanResourceAttributes returns a ResourceAttribute object to be used in a filter +func TestPlanResourceAttributes(verb string) authv1.ResourceAttributes { + return authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testplans", + Verb: verb, + } +} diff --git a/apis/meta/v1alpha1/testplan_types_test.go b/apis/meta/v1alpha1/testplan_types_test.go new file mode 100644 index 00000000..39d12c9a --- /dev/null +++ b/apis/meta/v1alpha1/testplan_types_test.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + authv1 "k8s.io/api/authorization/v1" +) + +var _ = Describe("TestPlan", func() { + Context("TestPlanResourceAttributes", func() { + It("should return related attributes", func() { + Expect(TestPlanResourceAttributes("get")).To(Equal(authv1.ResourceAttributes{ + Group: GroupVersion.Group, + Version: GroupVersion.Version, + Resource: "testplans", + Verb: "get", + })) + }) + }) +}) diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index d3735b29..52fabf7d 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -3006,6 +3006,418 @@ func (in *SortOptions) DeepCopy() *SortOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestBuildStatusInfo) DeepCopyInto(out *TestBuildStatusInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestBuildStatusInfo. +func (in *TestBuildStatusInfo) DeepCopy() *TestBuildStatusInfo { + if in == nil { + return nil + } + out := new(TestBuildStatusInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCase) DeepCopyInto(out *TestCase) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCase. +func (in *TestCase) DeepCopy() *TestCase { + if in == nil { + return nil + } + out := new(TestCase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecution) DeepCopyInto(out *TestCaseExecution) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecution. +func (in *TestCaseExecution) DeepCopy() *TestCaseExecution { + if in == nil { + return nil + } + out := new(TestCaseExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecutionList) DeepCopyInto(out *TestCaseExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestCaseExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecutionList. +func (in *TestCaseExecutionList) DeepCopy() *TestCaseExecutionList { + if in == nil { + return nil + } + out := new(TestCaseExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseExecutionSpec) DeepCopyInto(out *TestCaseExecutionSpec) { + *out = *in + if in.BuildRef != nil { + in, out := &in.BuildRef, &out.BuildRef + *out = new(TestObjectRef) + **out = **in + } + in.CreatedAt.DeepCopyInto(&out.CreatedAt) + out.CreatedBy = in.CreatedBy +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseExecutionSpec. +func (in *TestCaseExecutionSpec) DeepCopy() *TestCaseExecutionSpec { + if in == nil { + return nil + } + out := new(TestCaseExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseList) DeepCopyInto(out *TestCaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestCase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseList. +func (in *TestCaseList) DeepCopy() *TestCaseList { + if in == nil { + return nil + } + out := new(TestCaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseRelatedObjectInfo) DeepCopyInto(out *TestCaseRelatedObjectInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseRelatedObjectInfo. +func (in *TestCaseRelatedObjectInfo) DeepCopy() *TestCaseRelatedObjectInfo { + if in == nil { + return nil + } + out := new(TestCaseRelatedObjectInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseSpec) DeepCopyInto(out *TestCaseSpec) { + *out = *in + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]TestCaseStepInfo, len(*in)) + copy(*out, *in) + } + out.CreatedBy = in.CreatedBy + if in.RelatedRequirements != nil { + in, out := &in.RelatedRequirements, &out.RelatedRequirements + *out = make([]TestCaseRelatedObjectInfo, len(*in)) + copy(*out, *in) + } + if in.RelatedBugs != nil { + in, out := &in.RelatedBugs, &out.RelatedBugs + *out = make([]TestCaseRelatedObjectInfo, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseSpec. +func (in *TestCaseSpec) DeepCopy() *TestCaseSpec { + if in == nil { + return nil + } + out := new(TestCaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseStatus) DeepCopyInto(out *TestCaseStatus) { + *out = *in + if in.LastExecution != nil { + in, out := &in.LastExecution, &out.LastExecution + *out = new(TestCaseExecutionSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseStatus. +func (in *TestCaseStatus) DeepCopy() *TestCaseStatus { + if in == nil { + return nil + } + out := new(TestCaseStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestCaseStepInfo) DeepCopyInto(out *TestCaseStepInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestCaseStepInfo. +func (in *TestCaseStepInfo) DeepCopy() *TestCaseStepInfo { + if in == nil { + return nil + } + out := new(TestCaseStepInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModule) DeepCopyInto(out *TestModule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModule. +func (in *TestModule) DeepCopy() *TestModule { + if in == nil { + return nil + } + out := new(TestModule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleCaseRef) DeepCopyInto(out *TestModuleCaseRef) { + *out = *in + out.TestObjectRef = in.TestObjectRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleCaseRef. +func (in *TestModuleCaseRef) DeepCopy() *TestModuleCaseRef { + if in == nil { + return nil + } + out := new(TestModuleCaseRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleList) DeepCopyInto(out *TestModuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestModule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleList. +func (in *TestModuleList) DeepCopy() *TestModuleList { + if in == nil { + return nil + } + out := new(TestModuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestModuleSpec) DeepCopyInto(out *TestModuleSpec) { + *out = *in + if in.TestCases != nil { + in, out := &in.TestCases, &out.TestCases + *out = make([]TestModuleCaseRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleSpec. +func (in *TestModuleSpec) DeepCopy() *TestModuleSpec { + if in == nil { + return nil + } + out := new(TestModuleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestObjectRef) DeepCopyInto(out *TestObjectRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestObjectRef. +func (in *TestObjectRef) DeepCopy() *TestObjectRef { + if in == nil { + return nil + } + out := new(TestObjectRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlan) DeepCopyInto(out *TestPlan) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlan. +func (in *TestPlan) DeepCopy() *TestPlan { + if in == nil { + return nil + } + out := new(TestPlan) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanList) DeepCopyInto(out *TestPlanList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestPlan, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanList. +func (in *TestPlanList) DeepCopy() *TestPlanList { + if in == nil { + return nil + } + out := new(TestPlanList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanSpec) DeepCopyInto(out *TestPlanSpec) { + *out = *in + out.Assignee = in.Assignee + out.CreatedBy = in.CreatedBy + if in.BuildRefs != nil { + in, out := &in.BuildRefs, &out.BuildRefs + *out = make([]TestObjectRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanSpec. +func (in *TestPlanSpec) DeepCopy() *TestPlanSpec { + if in == nil { + return nil + } + out := new(TestPlanSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestPlanStatus) DeepCopyInto(out *TestPlanStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apis.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.BuildRef != nil { + in, out := &in.BuildRef, &out.BuildRef + *out = new(TestObjectRef) + **out = **in + } + if in.StartDate != nil { + in, out := &in.StartDate, &out.StartDate + *out = (*in).DeepCopy() + } + if in.EndDate != nil { + in, out := &in.EndDate, &out.EndDate + *out = (*in).DeepCopy() + } + out.TestBuildStatus = in.TestBuildStatus +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlanStatus. +func (in *TestPlanStatus) DeepCopy() *TestPlanStatus { + if in == nil { + return nil + } + out := new(TestPlanStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestProjectOptions) DeepCopyInto(out *TestProjectOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestProjectOptions. +func (in *TestProjectOptions) DeepCopy() *TestProjectOptions { + if in == nil { + return nil + } + out := new(TestProjectOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TriggeredBy) DeepCopyInto(out *TriggeredBy) { *out = *in diff --git a/go.mod b/go.mod index b69f1990..17237eca 100644 --- a/go.mod +++ b/go.mod @@ -31,8 +31,6 @@ require ( k8s.io/apimachinery v0.23.9 k8s.io/apiserver v0.23.9 k8s.io/client-go v0.23.9 - k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486 sigs.k8s.io/controller-runtime v0.11.2 sigs.k8s.io/yaml v1.3.0 @@ -119,6 +117,7 @@ require ( go.uber.org/automaxprocs v1.4.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -134,6 +133,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.23.9 // indirect k8s.io/component-base v0.23.9 // indirect + k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/kustomize/api v0.10.1 // indirect sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect diff --git a/go.sum b/go.sum index 78fe1628..ef4c732f 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,7 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -43,10 +44,12 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -68,9 +71,12 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/jsonschema v0.0.0-20180308105923-f2c93856175a/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -93,11 +99,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= +github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/caarlos0/env/v6 v6.6.2 h1:BypLXDWQTA32rS4UM7pBz+/0BOuvs6C7LSeQAxMwyvI= github.com/caarlos0/env/v6 v6.6.2/go.mod h1:P0BVSgU9zfkxfSpFUs6KsO3uWR4k3Ac0P66ibAGTybM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -105,6 +114,7 @@ github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnd github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -143,21 +153,27 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-gk v0.0.0-20140819190930-201884a44051/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= +github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77/go.mod h1:Va5MyIzkU0rAM92tn3hb3Anb7oz7KcnixF49+2wOMe4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful-openapi/v2 v2.3.0 h1:tDgSCzQrkk4N+Isos0zGBYX/GTINjmQuP9BvITbEe38= github.com/emicklei/go-restful-openapi/v2 v2.3.0/go.mod h1:bs67E3SEVgSmB3qDuRLqpS0NcpheqtsCCMhW2/jml1E= github.com/emicklei/go-restful/v3 v3.0.0-rc2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -232,8 +248,11 @@ github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -277,8 +296,18 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= +github.com/gonum/diff v0.0.0-20181124234638-500114f11e71/go.mod h1:22dM4PLscQl+Nzf64qNBurVJvfyvZELT0iRW2l/NN70= +github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= +github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2/go.mod h1:pDgmNM6seYpwvPos3q+zxlXMsbve6mOIPucUnUOrI7Y= +github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= +github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= +github.com/gonum/mathext v0.0.0-20181121095525-8a4bf007ea55/go.mod h1:fmo8aiSEWkJeiGXUJf+sPvuDgEFgqIoZSs843ePKrGg= +github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= +github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= @@ -299,10 +328,13 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -318,6 +350,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -336,6 +369,8 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -381,6 +416,7 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9GkyshztGufsdPQWjH+ifgnIr3xNUL5syI70g2dzU1o= github.com/jarcoal/httpmock v1.0.8 h1:8kI16SoO6LQKgPE7PvQuV+YuD/inwHd7fOOe2zMbo4k= github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -430,6 +466,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -453,6 +490,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -486,17 +524,21 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -505,6 +547,7 @@ github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 h1:TVz github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= @@ -513,11 +556,13 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -528,6 +573,7 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -554,6 +600,7 @@ github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -594,6 +641,8 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8tGiBjZ5YWIc2fzuRpTaz0b/53vT6PEs3QuAWzuU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= @@ -608,6 +657,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tsenart/go-tsz v0.0.0-20180814232043-cdeb9e1e981e/go.mod h1:SWZznP1z5Ki7hDT2ioqiFKEse8K9tU2OUvaRI0NeGQo= +github.com/tsenart/vegeta/v12 v12.8.4/go.mod h1:ZiJtwLn/9M4fTPdMY7bdbIeyNeFVE8/AHbWFqCsUuho= github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -629,6 +680,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -646,6 +698,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -684,6 +737,7 @@ go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -693,12 +747,14 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -740,7 +796,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -792,6 +850,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -811,6 +871,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -897,8 +958,13 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -941,6 +1007,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -986,7 +1053,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1029,6 +1098,7 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1098,11 +1168,15 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1188,23 +1262,31 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= k8s.io/api v0.23.9 h1:v7Ee2CZuyb6rVm1q4bUe7ZonWleLsrvgcOTxPGjQVa4= k8s.io/api v0.23.9/go.mod h1:r4g0GrGdLgwSYB90qgO4tBrbKtALBhUfut+oFt4ikCc= +k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= k8s.io/apiextensions-apiserver v0.23.9 h1:q6X/HhgKo7/Up1p1TeNGNAwqcaBcxaxjxxwXa/5ht+E= k8s.io/apiextensions-apiserver v0.23.9/go.mod h1:uu79PjF1T6YbfFqL5kVTmEdxb40Z0eHM7MfHDHz9dho= +k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.23.9 h1:u9Pu7Ffe+9+QJUemtNjuCwvHSnOUeYEwgSHV+88Ne0g= k8s.io/apimachinery v0.23.9/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/apiserver v0.23.9 h1:SyqC4vrduSS9hkWLHww8kuFL9mVRal798kRHwGHESRM= k8s.io/apiserver v0.23.9/go.mod h1:vIXpgCnHep34bP/y+wGhYdn1NgxAvWtntxfEjst0e74= k8s.io/cli-runtime v0.23.9 h1:9gHvQjL/S87hI7xWUwicIPCnF9CFPCmgBC8rNldozho= k8s.io/cli-runtime v0.23.9/go.mod h1:hDcaaDVGThFtszfsg3tErDQ1k/elaNZjRljz0OWBdBg= +k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/client-go v0.23.9 h1:OKxNCL+nhw7UBB5b01OVuAV4Db/AdBdaV6/GYpucuOw= k8s.io/client-go v0.23.9/go.mod h1:sNo0X0MZqo4Uu0qDY5Fl5Y60cJFinBDWWUBOAM5JUCM= +k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/code-generator v0.23.9/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= k8s.io/component-base v0.23.9 h1:YcKppshHzZA7ZG+na+lRdUn/pj+3AMPsp9BaImh2hVo= k8s.io/component-base v0.23.9/go.mod h1:WUNtIRIMd9WBS2r5LCSNZoh6f/Uh+8O+aGuZUG5t428= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1217,8 +1299,10 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +knative.dev/hack v0.0.0-20220725145124-782bbaabb8a1/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486 h1:eWw7LtEIq2GjR9Z5Uw86BlVYyLh50ueJfcXV0SQiMWc= knative.dev/pkg v0.0.0-20220802185824-a01dfedb0486/go.mod h1:nBMKMJvyoaJdkpUrjwLVs/DwaP6d73R3UkXK6lblJyE= +pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/plugin/client/interface.go b/plugin/client/interface.go index 6a094977..592ba012 100644 --- a/plugin/client/interface.go +++ b/plugin/client/interface.go @@ -415,3 +415,38 @@ type ProjectUserLister interface { Interface ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, option metav1alpha1.ListOptions) (*metav1alpha1.UserList, error) } + +type TestPlanLister interface { + Interface + ListTestPlans(ctx context.Context, params metav1alpha1.TestProjectOptions, option metav1alpha1.ListOptions) (*metav1alpha1.TestPlanList, error) +} + +type TestPlanGetter interface { + Interface + GetTestPlan(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestPlan, error) +} + +type TestCaseLister interface { + Interface + ListTestCases(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseList, error) +} + +type TestCaseGetter interface { + Interface + GetTestCase(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestCase, error) +} + +type TestModuleLister interface { + Interface + ListTestModules(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestModuleList, error) +} + +type TestCaseExecutionLister interface { + Interface + ListTestCaseExecutions(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseExecutionList, error) +} + +type TestCaseExecutionCreator interface { + Interface + CreateTestCaseExecution(ctx context.Context, params metav1alpha1.TestProjectOptions, payload metav1alpha1.TestCaseExecution) (*metav1alpha1.TestCaseExecution, error) +} diff --git a/plugin/client/plugin_client.go b/plugin/client/plugin_client.go index ea71de3c..a788d67f 100644 --- a/plugin/client/plugin_client.go +++ b/plugin/client/plugin_client.go @@ -401,3 +401,23 @@ func (p *PluginClient) GitRepositoryTag(meta Meta, secret corev1.Secret) ClientG func (p *PluginClient) NewGitRepositoryTag() ClientGitRepositoryTag { return newGitRepositoryTag(p, p.meta, p.secret) } + +// TestPlan get test plan client +func (p *PluginClient) TestPlan(meta Meta, secret corev1.Secret) ClientTestPlan { + return newTestPlan(p, meta, secret) +} + +// TestCase get test case client +func (p *PluginClient) TestCase(meta Meta, secret corev1.Secret) ClientTestCase { + return newTestCase(p, meta, secret) +} + +// TestModule get test module client +func (p *PluginClient) TestModule(meta Meta, secret corev1.Secret) ClientTestModule { + return newTestModule(p, meta, secret) +} + +// TestCaseExecution get test case execution client +func (p *PluginClient) TestCaseExecution(meta Meta, secret corev1.Secret) ClientTestCaseExecution { + return newTestCaseExecution(p, meta, secret) +} diff --git a/plugin/client/testcase.go b/plugin/client/testcase.go new file mode 100644 index 00000000..7fb2aaf7 --- /dev/null +++ b/plugin/client/testcase.go @@ -0,0 +1,74 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestCase interface { + List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) + Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) +} + +type testCase struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestCase(client Client, meta Meta, secret corev1.Secret) ClientTestCase { + return &testCase{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testCase) List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) { + list := &metav1alpha1.TestCaseList{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testCase) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) { + tc := &metav1alpha1.TestCase{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases/%s", params.Project, params.TestPlanID, params.TestCaseID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go new file mode 100644 index 00000000..2a5b993a --- /dev/null +++ b/plugin/client/testcaseexecution.go @@ -0,0 +1,91 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestCaseExecution interface { + List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestCaseExecutionList, error) + Create(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + payload metav1alpha1.TestCaseExecution, + options ...OptionFunc, + ) (*metav1alpha1.TestCaseExecution, error) +} + +type testCaseExecution struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestCaseExecution(client Client, meta Meta, secret corev1.Secret) ClientTestCaseExecution { + return &testCaseExecution{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testCaseExecution) List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestCaseExecutionList, error) { + list := &metav1alpha1.TestCaseExecutionList{} + + uri := fmt.Sprintf( + "projects/%s/testplans/%s/testcases/%s/executions", + params.Project, + params.TestPlanID, + params.TestCaseID, + ) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testCaseExecution) Create(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + payload metav1alpha1.TestCaseExecution, + options ...OptionFunc) (*metav1alpha1.TestCaseExecution, error) { + tc := &metav1alpha1.TestCaseExecution{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testcases/%s/executions", params.Project, params.TestPlanID, + params.TestCaseID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), BodyOpts(payload), ResultOpts(tc)) + if err := p.client.Post(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/client/testmodule.go b/plugin/client/testmodule.go new file mode 100644 index 00000000..8729b78d --- /dev/null +++ b/plugin/client/testmodule.go @@ -0,0 +1,57 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestModule interface { + List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) +} + +type testModule struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestModule(client Client, meta Meta, secret corev1.Secret) ClientTestModule { + return &testModule{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testModule) List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) { + list := &metav1alpha1.TestModuleList{} + + uri := fmt.Sprintf("projects/%s/testplans/%s/testmodules", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} diff --git a/plugin/client/testplan.go b/plugin/client/testplan.go new file mode 100644 index 00000000..53eba0ba --- /dev/null +++ b/plugin/client/testplan.go @@ -0,0 +1,87 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + corev1 "k8s.io/api/core/v1" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +type ClientTestPlan interface { + List(ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc, + ) (*metav1alpha1.TestPlanList, error) + + Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, + options ...OptionFunc) (*metav1alpha1.TestPlan, error) +} + +type testPlan struct { + client Client + meta Meta + secret corev1.Secret +} + +func newTestPlan(client Client, meta Meta, secret corev1.Secret) ClientTestPlan { + return &testPlan{ + client: client, + meta: meta, + secret: secret, + } +} + +// List get project using plugin +func (p *testPlan) List( + ctx context.Context, + baseURL *duckv1.Addressable, + params metav1alpha1.TestProjectOptions, + options ...OptionFunc, +) (*metav1alpha1.TestPlanList, error) { + list := &metav1alpha1.TestPlanList{} + + uri := fmt.Sprintf("projects/%s/testplans", params.Project) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), + QueryOpts(map[string]string{ + "name": params.Search, + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return list, nil +} + +func (p *testPlan) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestPlan, error) { + tc := &metav1alpha1.TestPlan{} + + uri := fmt.Sprintf("projects/%s/testplans/%s", params.Project, params.TestPlanID) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(tc), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) + if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { + return nil, err + } + + return tc, nil +} diff --git a/plugin/route/repository.go b/plugin/route/repository.go index 95a970b7..5b208b0e 100644 --- a/plugin/route/repository.go +++ b/plugin/route/repository.go @@ -31,7 +31,7 @@ type repositoryList struct { tags []string } -//NewRepositoryList create a list repository route with plugin client +// NewRepositoryList create a list repository route with plugin client func NewRepositoryList(impl client.RepositoryLister) Route { return &repositoryList{ tags: []string{"projects", "repositories"}, diff --git a/plugin/route/route.go b/plugin/route/route.go index 75d50075..abce19eb 100644 --- a/plugin/route/route.go +++ b/plugin/route/route.go @@ -226,6 +226,27 @@ func match(c client.Interface) []Route { if v, ok := c.(client.ProjectUserLister); ok { routes = append(routes, NewProjectUserList(v)) } + if v, ok := c.(client.TestPlanLister); ok { + routes = append(routes, NewTestPlanList(v)) + } + if v, ok := c.(client.TestPlanGetter); ok { + routes = append(routes, NewTestPlanGetter(v)) + } + if v, ok := c.(client.TestCaseLister); ok { + routes = append(routes, NewTestCaseLister(v)) + } + if v, ok := c.(client.TestCaseGetter); ok { + routes = append(routes, NewTestCaseGetter(v)) + } + if v, ok := c.(client.TestModuleLister); ok { + routes = append(routes, NewTestModuleLister(v)) + } + if v, ok := c.(client.TestCaseExecutionLister); ok { + routes = append(routes, NewTestCaseExecutionLister(v)) + } + if v, ok := c.(client.TestCaseExecutionCreator); ok { + routes = append(routes, NewTestCaseExecutionCreator(v)) + } return routes } @@ -357,6 +378,28 @@ func GetMethods(c client.Interface) []string { if _, ok := c.(client.ProjectUserLister); ok { methods = append(methods, "ListProjectUsers") } + if _, ok := c.(client.TestPlanLister); ok { + methods = append(methods, "ListTestPlans") + } + if _, ok := c.(client.TestPlanGetter); ok { + methods = append(methods, "GetTestPlan") + } + if _, ok := c.(client.TestCaseLister); ok { + methods = append(methods, "ListTestCases") + } + if _, ok := c.(client.TestCaseGetter); ok { + methods = append(methods, "GetTestCase") + } + if _, ok := c.(client.TestModuleLister); ok { + methods = append(methods, "ListTestModules") + } + if _, ok := c.(client.TestCaseExecutionLister); ok { + methods = append(methods, "ListTestCaseExecutions") + } + if _, ok := c.(client.TestCaseExecutionCreator); ok { + methods = append(methods, "CreateTestCaseExecution") + } + return methods } @@ -397,7 +440,7 @@ func NewDefaultService() *restful.WebService { return ws } -//NewDocService go restful api doc +// NewDocService go restful api doc func NewDocService(webservices ...*restful.WebService) *restful.WebService { config := restfulspec.Config{ WebServices: webservices, diff --git a/plugin/route/testcase.go b/plugin/route/testcase.go new file mode 100644 index 00000000..208a1063 --- /dev/null +++ b/plugin/route/testcase.go @@ -0,0 +1,126 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testCaseLister struct { + impl client.TestCaseLister + tags []string +} + +// NewTestCaseLister creates a list testCase route with plugin client +func NewTestCaseLister(impl client.TestCaseLister) Route { + return &testCaseLister{ + tags: []string{"projects", "testCase"}, + impl: impl, + } +} + +func (r *testCaseLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testCase belong to integraion") + testPlanIDParam := ws.PathParameter("testplanid", "test plan id") + buildIDParam := ws.PathParameter("buildID", "test plan id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases").To(r.ListTestCases). + // docs + Doc("ListTestCases"). + Param(projectParam). + Param(testPlanIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseList{}), + ), + ) +} + +// ListTestCases http handler for list testCase +func (r *testCaseLister) ListTestCases(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + BuildID: request.QueryParameter("buildID"), + } + testCases, err := r.impl.ListTestCases(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCases) +} + +type testCaseGetter struct { + impl client.TestCaseGetter + tags []string +} + +// NewTestCaseGetter creates a list testCase route with plugin client +func NewTestCaseGetter(impl client.TestCaseGetter) Route { + return &testCaseGetter{ + tags: []string{"projects", "testCase"}, + impl: impl, + } +} + +func (r *testCaseGetter) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanIDParam := ws.PathParameter("testplanid", "test plan id") + testCaseIDParam := ws.PathParameter("testcaseid", "test case id") + buildIDParam := ws.QueryParameter("buildID", "test case id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid:*}").To(r.GetTestCase). + // docs + Doc("GetTestCase"). + Param(projectParam). + Param(testPlanIDParam). + Param(testCaseIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCase{}), + ), + ) +} + +// GetTestCase http handler for getting testCase +func (r *testCaseGetter) GetTestCase(request *restful.Request, response *restful.Response) { + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + testCase, err := r.impl.GetTestCase(request.Request.Context(), pathParams) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCase) +} diff --git a/plugin/route/testcaseexecution.go b/plugin/route/testcaseexecution.go new file mode 100644 index 00000000..fa4f0e82 --- /dev/null +++ b/plugin/route/testcaseexecution.go @@ -0,0 +1,135 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testCaseExecutionLister struct { + impl client.TestCaseExecutionLister + tags []string +} + +// NewTestCaseExecutionLister creates a list testCaseExecution route with plugin client +func NewTestCaseExecutionLister(impl client.TestCaseExecutionLister) Route { + return &testCaseExecutionLister{ + tags: []string{"projects", "testCaseExecution"}, + impl: impl, + } +} + +func (r *testCaseExecutionLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanParam := ws.PathParameter("testplanid", "testPlan belong to project") + testCaseParam := ws.PathParameter("testcaseid", "testCase belong to testPlan") + buildParam := ws.QueryParameter("buildID", "build id related to testPlan") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid}/executions").To(r. + ListTestCaseExecutions). + // docs + Doc("ListTestCaseExecutions").Param(projectParam). + Param(testPlanParam). + Param(testCaseParam). + Param(buildParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseExecutionList{}), + ), + ) +} + +// ListTestCaseExecutions http handler for list testCaseExecution +func (r *testCaseExecutionLister) ListTestCaseExecutions(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + testCaseExecutions, err := r.impl.ListTestCaseExecutions(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCaseExecutions) +} + +type testCaseExecutionCreator struct { + impl client.TestCaseExecutionCreator + tags []string +} + +// NewTestCaseExecutionCreator creates a creating testCaseExecution route with plugin client +func NewTestCaseExecutionCreator(impl client.TestCaseExecutionCreator) Route { + return &testCaseExecutionCreator{ + tags: []string{"projects", "testCaseExecution"}, + impl: impl, + } +} + +func (r *testCaseExecutionCreator) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "project belong to integraion") + testPlanParam := ws.PathParameter("testplanid", "testPlan belong to project") + testCaseParam := ws.PathParameter("testcaseid", "testCase belong to testPlan") + buildParam := ws.QueryParameter("buildID", "build id related to testPlan") + ws.Route( + ws.POST("/projects/{project:*}/testplans/{testplanid:*}/testcases/{testcaseid}/executions"). + To(r.CreateTestCaseExecution). + // docs + Doc("CreateTestCaseExecution"). + Param(projectParam). + Param(testPlanParam). + Param(testCaseParam). + Param(buildParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseExecution{}), + ) +} + +// CreateTestCaseExecution http handler for creating testCaseExecution +func (r *testCaseExecutionCreator) CreateTestCaseExecution(request *restful.Request, response *restful.Response) { + params := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + TestCaseID: request.PathParameter("testcaseid"), + BuildID: request.QueryParameter("buildID"), + } + + var payload metav1alpha1.TestCaseExecution + if err := request.ReadEntity(&payload); err != nil { + kerrors.HandleError(request, response, err) + return + } + + testCaseExecution, err := r.impl.CreateTestCaseExecution(request.Request.Context(), params, payload) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testCaseExecution) +} diff --git a/plugin/route/testmodule.go b/plugin/route/testmodule.go new file mode 100644 index 00000000..21305afe --- /dev/null +++ b/plugin/route/testmodule.go @@ -0,0 +1,70 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testModuleLister struct { + impl client.TestModuleLister + tags []string +} + +// NewTestModuleLister creates a list testModule route with plugin client +func NewTestModuleLister(impl client.TestModuleLister) Route { + return &testModuleLister{ + tags: []string{"projects", "testModule"}, + impl: impl, + } +} + +func (r *testModuleLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testModule belong to integraion") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testmodules").To(r.ListTestModules). + // docs + Doc("ListTestModules").Param(projectParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestModuleList{}), + ), + ) +} + +// ListTestModules http handler for list testModule +func (r *testModuleLister) ListTestModules(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + } + testModules, err := r.impl.ListTestModules(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testModules) +} diff --git a/plugin/route/testplan.go b/plugin/route/testplan.go new file mode 100644 index 00000000..7c22a0f9 --- /dev/null +++ b/plugin/route/testplan.go @@ -0,0 +1,115 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "net/http" + + restfulspec "github.com/emicklei/go-restful-openapi/v2" + "github.com/emicklei/go-restful/v3" + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + kerrors "github.com/katanomi/pkg/errors" + "github.com/katanomi/pkg/plugin/client" +) + +type testPlanLister struct { + impl client.TestPlanLister + tags []string +} + +// NewTestPlanList creates a list testPlan route with plugin client +func NewTestPlanList(impl client.TestPlanLister) Route { + return &testPlanLister{ + tags: []string{"projects", "testPlan"}, + impl: impl, + } +} + +func (r *testPlanLister) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testPlan belong to integraion") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans").To(r.ListTestPlans). + // docs + Doc("ListTestPlans").Param(projectParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestPlanList{}), + ), + ) +} + +// ListTestPlans http handler for list testPlan +func (r *testPlanLister) ListTestPlans(request *restful.Request, response *restful.Response) { + option := GetListOptionsFromRequest(request) + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + } + testPlans, err := r.impl.ListTestPlans(request.Request.Context(), pathParams, option) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testPlans) +} + +type testPlanGetter struct { + impl client.TestPlanGetter + tags []string +} + +// NewTestPlanGetter creates a list testPlan route with plugin client +func NewTestPlanGetter(impl client.TestPlanGetter) Route { + return &testPlanGetter{ + tags: []string{"projects", "testPlan"}, + impl: impl, + } +} + +func (r *testPlanGetter) Register(ws *restful.WebService) { + projectParam := ws.PathParameter("project", "testPlan project belong to integraion") + testPlanIDParam := ws.PathParameter("testPlanID", "test plan id") + buildIDParam := ws.QueryParameter("buildID", "test build id") + ws.Route( + ListOptionsDocs( + ws.GET("/projects/{project:*}/testplans/{testplanid}").To(r.GetTestPlan). + // docs + Doc("GetTestCase"). + Param(projectParam). + Param(testPlanIDParam). + Param(buildIDParam). + Metadata(restfulspec.KeyOpenAPITags, r.tags). + Returns(http.StatusOK, "OK", metav1alpha1.TestCaseList{}), + ), + ) +} + +// GetTestPlan http handler for getting testPlan +func (r *testPlanGetter) GetTestPlan(request *restful.Request, response *restful.Response) { + pathParams := metav1alpha1.TestProjectOptions{ + Project: request.PathParameter("project"), + TestPlanID: request.PathParameter("testplanid"), + BuildID: request.QueryParameter("buildID"), + } + testPlan, err := r.impl.GetTestPlan(request.Request.Context(), pathParams) + if err != nil { + kerrors.HandleError(request, response, err) + return + } + + response.WriteHeaderAndEntity(http.StatusOK, testPlan) +} From ef9a87e525c8014f5eac4108923f2785070b34fc Mon Sep 17 00:00:00 2001 From: jzli Date: Fri, 19 Aug 2022 17:32:28 +0800 Subject: [PATCH 08/13] chore: add annotations --- apis/meta/v1alpha1/testcase_types.go | 8 ++++++++ apis/meta/v1alpha1/testcaseexecution_types.go | 2 ++ apis/meta/v1alpha1/testmodule_types.go | 2 ++ apis/meta/v1alpha1/testplan_types.go | 3 +++ plugin/client/interface.go | 15 +++++++++++---- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apis/meta/v1alpha1/testcase_types.go b/apis/meta/v1alpha1/testcase_types.go index 0cc6af60..b25cd3f3 100644 --- a/apis/meta/v1alpha1/testcase_types.go +++ b/apis/meta/v1alpha1/testcase_types.go @@ -45,15 +45,19 @@ type TestCaseSpec struct { // Steps tell testers how to do to execute this case Steps []TestCaseStepInfo `json:"steps"` // CreatedBy is the user who created the TestCase + // +optional CreatedBy UserSpec `json:"createdBy"` // Priority shows how important this case is Priority string `json:"priority"` // RelatedRequirements is a list of product requirements related to this test case + // +optional RelatedRequirements []TestCaseRelatedObjectInfo `json:"relatedRequirements"` // RelatedBugs is a list of bugs related to this test case + // +optional RelatedBugs []TestCaseRelatedObjectInfo `json:"relatedBugs"` } +// TestCaseStepInfo describes details of TestCaseStep type TestCaseStepInfo struct { // ID is the id of step generated by integration tools ID string `json:"id"` @@ -65,15 +69,19 @@ type TestCaseStepInfo struct { Expect string `json:"expect"` } +// TestCaseRelatedObjectInfo refers to an object related to test case type TestCaseRelatedObjectInfo struct { // Title is the title of related object Title string `json:"title"` // TargetURL is the URL for redirection + // +optional TargetURL string `json:"targetURL"` } +// TestCaseStatus includes status of test case type TestCaseStatus struct { // LastExecution is spec of the latest TestExecution related to the test case + // +optional LastExecution *TestCaseExecutionSpec `json:"lastExecution"` } diff --git a/apis/meta/v1alpha1/testcaseexecution_types.go b/apis/meta/v1alpha1/testcaseexecution_types.go index d4af3b03..53c98df3 100644 --- a/apis/meta/v1alpha1/testcaseexecution_types.go +++ b/apis/meta/v1alpha1/testcaseexecution_types.go @@ -24,6 +24,7 @@ import ( var TestCaseExecutionGVK = GroupVersion.WithKind("TestCaseExecution") var TestCaseExecutionListGVK = GroupVersion.WithKind("TestCaseExecutionList") +// TestCaseExecutionStatus covers possible values of TestcaseExecutionStatus type TestCaseExecutionStatus string // Possible test case execution status below @@ -48,6 +49,7 @@ type TestCaseExecutionSpec struct { TestPlanID string `json:"testPlanId"` // BuildRef refers to the build related to current test case + // +optional BuildRef *TestObjectRef `json:"buildRef"` // Status is the execution result status diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go index 856b4660..a253199a 100644 --- a/apis/meta/v1alpha1/testmodule_types.go +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -41,9 +41,11 @@ type TestModuleSpec struct { // ParentID is the parent module ID ParentID string `json:"parentID"` // TestCases are the cases included by a module + // +optional TestCases []TestModuleCaseRef `json:"testCases"` } +// TestModuleCaseRef refers to a test module and its order type TestModuleCaseRef struct { // TestObjectRef refers to a test case TestObjectRef `json:"ref"` diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go index 10f89a2e..b6e68729 100644 --- a/apis/meta/v1alpha1/testplan_types.go +++ b/apis/meta/v1alpha1/testplan_types.go @@ -47,6 +47,7 @@ type TestPlanSpec struct { BuildRefs []TestObjectRef `json:"buildRefs"` } +// TestObjectRef refers to a test object type TestObjectRef struct { // Name is the name of the build Name string `json:"name"` @@ -54,6 +55,7 @@ type TestObjectRef struct { ID string `json:"id"` } +// TestPlanStatus for test plan status type TestPlanStatus struct { // Conditions indicates the latest status of TestPlan within a build apis.Conditions `json:"conditions"` @@ -69,6 +71,7 @@ type TestPlanStatus struct { TestBuildStatus TestBuildStatusInfo `json:"testBuildStatus,omitempty"` } +// TestBuildStatusInfo for test build status type TestBuildStatusInfo struct { // TotalCases is the total number of cases TotalCases int `json:"totalCases"` diff --git a/plugin/client/interface.go b/plugin/client/interface.go index 592ba012..9b2d0277 100644 --- a/plugin/client/interface.go +++ b/plugin/client/interface.go @@ -155,10 +155,10 @@ type WebhookRegister interface { // TODO: need refactor: maybe integration plugin should decided how to generate cloudevents filters // up to now, it is not a better solution that relying on plugins to give some events type to GitTriggerReconcile. // -// PullRequestCloudEventFilter() CloudEventFilters -// BranchCloudEventFilter() CloudEventFilters -// TagCloudEventFilter() CloudEventFilters -// WebHook() WebHook +// PullRequestCloudEventFilter() CloudEventFilters +// BranchCloudEventFilter() CloudEventFilters +// TagCloudEventFilter() CloudEventFilters +// WebHook() WebHook type GitTriggerRegister interface { GetIntegrationClassName() string @@ -416,36 +416,43 @@ type ProjectUserLister interface { ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, option metav1alpha1.ListOptions) (*metav1alpha1.UserList, error) } +// TestPlanLister list test plans type TestPlanLister interface { Interface ListTestPlans(ctx context.Context, params metav1alpha1.TestProjectOptions, option metav1alpha1.ListOptions) (*metav1alpha1.TestPlanList, error) } +// TestPlanGetter get a test plan type TestPlanGetter interface { Interface GetTestPlan(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestPlan, error) } +// TestCaseLister list test cases type TestCaseLister interface { Interface ListTestCases(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseList, error) } +// TestCaseGetter get a test case type TestCaseGetter interface { Interface GetTestCase(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestCase, error) } +// TestModuleLister list a test module type TestModuleLister interface { Interface ListTestModules(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestModuleList, error) } +// TestCaseExecutionLister list test case executions type TestCaseExecutionLister interface { Interface ListTestCaseExecutions(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseExecutionList, error) } +// TestCaseExecutionCreator create a new test case execution type TestCaseExecutionCreator interface { Interface CreateTestCaseExecution(ctx context.Context, params metav1alpha1.TestProjectOptions, payload metav1alpha1.TestCaseExecution) (*metav1alpha1.TestCaseExecution, error) From a329b3d96593b9c1e21767cc38a4474c72895fd2 Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 14:21:54 +0800 Subject: [PATCH 09/13] fix: annotation & naming convention --- apis/data/v1alpha1/zz_generated.deepcopy.go | 2 +- apis/meta/v1alpha1/project_types.go | 6 +++--- apis/meta/v1alpha1/testmodule_types.go | 4 ++-- apis/meta/v1alpha1/testmodule_types_test.go | 2 +- apis/meta/v1alpha1/testplan_types.go | 2 +- apis/meta/v1alpha1/zz_generated.deepcopy.go | 4 ++-- plugin/client/testcase.go | 1 + plugin/client/testcaseexecution.go | 1 + plugin/client/testmodule.go | 1 + plugin/client/testplan.go | 1 + 10 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apis/data/v1alpha1/zz_generated.deepcopy.go b/apis/data/v1alpha1/zz_generated.deepcopy.go index c4210c1d..ff66c0eb 100644 --- a/apis/data/v1alpha1/zz_generated.deepcopy.go +++ b/apis/data/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/apis/meta/v1alpha1/project_types.go b/apis/meta/v1alpha1/project_types.go index a32b5f41..88d81b61 100644 --- a/apis/meta/v1alpha1/project_types.go +++ b/apis/meta/v1alpha1/project_types.go @@ -55,7 +55,7 @@ func (r ProjectSubType) Validate(fld *field.Path) field.ErrorList { MavenRepositoryProjectSubType: {}, RawRepositoryProjectSubType: {}, ProjectManagementSubtype: {}, - TestProjectSubtype: {}, + TestProjectSubType: {}, } if _, exist := supportedTypes[r]; !exist { @@ -87,8 +87,8 @@ const ( // ProjectManagementSubtype project management subtype ProjectManagementSubtype ProjectSubType = "ProjectManagement" - // TestProjectSubtype test project subtype - TestProjectSubtype ProjectSubType = "TestProject" + // TestProjectSubType test project subtype + TestProjectSubType ProjectSubType = "TestProject" // TODO: add more subtypes ) diff --git a/apis/meta/v1alpha1/testmodule_types.go b/apis/meta/v1alpha1/testmodule_types.go index a253199a..d811bca0 100644 --- a/apis/meta/v1alpha1/testmodule_types.go +++ b/apis/meta/v1alpha1/testmodule_types.go @@ -48,7 +48,7 @@ type TestModuleSpec struct { // TestModuleCaseRef refers to a test module and its order type TestModuleCaseRef struct { // TestObjectRef refers to a test case - TestObjectRef `json:"ref"` + TestCase TestObjectRef `json:"ref"` // Order indicates the ASC order of the object at same level Order int `json:"order"` } @@ -77,7 +77,7 @@ func (tm *TestModule) ContainsTestCaseID(caseID string) bool { } for _, tc := range tm.Spec.TestCases { - if tc.ID == caseID { + if tc.TestCase.ID == caseID { return true } } diff --git a/apis/meta/v1alpha1/testmodule_types_test.go b/apis/meta/v1alpha1/testmodule_types_test.go index 4ad6a816..dee4c333 100644 --- a/apis/meta/v1alpha1/testmodule_types_test.go +++ b/apis/meta/v1alpha1/testmodule_types_test.go @@ -38,7 +38,7 @@ var _ = Describe("TestModule", func() { tm := TestModule{Spec: TestModuleSpec{ TestCases: []TestModuleCaseRef{ { - TestObjectRef: TestObjectRef{ID: "123", Name: "abc"}, + TestCase: TestObjectRef{ID: "123", Name: "abc"}, }, }, }} diff --git a/apis/meta/v1alpha1/testplan_types.go b/apis/meta/v1alpha1/testplan_types.go index b6e68729..1993da97 100644 --- a/apis/meta/v1alpha1/testplan_types.go +++ b/apis/meta/v1alpha1/testplan_types.go @@ -108,7 +108,7 @@ type TestProjectOptions struct { Search string `json:"search"` } -func GetRefByIDFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { +func RefFromMap(m map[string]*TestObjectRef, ID string) *TestObjectRef { if m == nil { return nil } diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index 52fabf7d..39e1d705 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/rbac/v1" + "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/runtime" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -3230,7 +3230,7 @@ func (in *TestModule) DeepCopy() *TestModule { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestModuleCaseRef) DeepCopyInto(out *TestModuleCaseRef) { *out = *in - out.TestObjectRef = in.TestObjectRef + out.TestCase = in.TestCase } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestModuleCaseRef. diff --git a/plugin/client/testcase.go b/plugin/client/testcase.go index 7fb2aaf7..b51771e1 100644 --- a/plugin/client/testcase.go +++ b/plugin/client/testcase.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestCase for test case type ClientTestCase interface { List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error) Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error) diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go index 2a5b993a..5cb5cdec 100644 --- a/plugin/client/testcaseexecution.go +++ b/plugin/client/testcaseexecution.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestCaseExecution client for test case execution type ClientTestCaseExecution interface { List(ctx context.Context, baseURL *duckv1.Addressable, diff --git a/plugin/client/testmodule.go b/plugin/client/testmodule.go index 8729b78d..36f24c95 100644 --- a/plugin/client/testmodule.go +++ b/plugin/client/testmodule.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestModule client for test module type ClientTestModule interface { List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error) } diff --git a/plugin/client/testplan.go b/plugin/client/testplan.go index 53eba0ba..4a7fb47b 100644 --- a/plugin/client/testplan.go +++ b/plugin/client/testplan.go @@ -25,6 +25,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" ) +// ClientTestPlan client for test plan type ClientTestPlan interface { List(ctx context.Context, baseURL *duckv1.Addressable, From 4e8ac7e8f027717333fb8ba6b4964ce580b33091 Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 16:55:08 +0800 Subject: [PATCH 10/13] fix: test coverage --- plugin/client/client_suite_test.go | 20 ++++ plugin/client/plugin_options_test.go | 27 ++--- plugin/client/testcase_test.go | 86 ++++++++++++++++ plugin/client/testcaseexecution.go | 4 +- plugin/client/testcaseexecution_test.go | 99 +++++++++++++++++++ plugin/client/testdata/fixtures/testcase.json | 79 +++++++++++++++ .../testdata/fixtures/testcaseexecution.json | 22 +++++ .../testdata/fixtures/testcaseexecutions.json | 87 ++++++++++++++++ .../client/testdata/fixtures/testcases.json | 37 +++++++ .../client/testdata/fixtures/testmodules.json | 29 ++++++ plugin/client/testdata/fixtures/testplan.json | 42 ++++++++ .../client/testdata/fixtures/testplans.json | 51 ++++++++++ plugin/client/testmodule_test.go | 66 +++++++++++++ plugin/client/testplan_test.go | 84 ++++++++++++++++ 14 files changed, 721 insertions(+), 12 deletions(-) create mode 100644 plugin/client/testcase_test.go create mode 100644 plugin/client/testcaseexecution_test.go create mode 100644 plugin/client/testdata/fixtures/testcase.json create mode 100644 plugin/client/testdata/fixtures/testcaseexecution.json create mode 100644 plugin/client/testdata/fixtures/testcaseexecutions.json create mode 100644 plugin/client/testdata/fixtures/testcases.json create mode 100644 plugin/client/testdata/fixtures/testmodules.json create mode 100644 plugin/client/testdata/fixtures/testplan.json create mode 100644 plugin/client/testdata/fixtures/testplans.json create mode 100644 plugin/client/testmodule_test.go create mode 100644 plugin/client/testplan_test.go diff --git a/plugin/client/client_suite_test.go b/plugin/client/client_suite_test.go index 16270aca..d106f51a 100644 --- a/plugin/client/client_suite_test.go +++ b/plugin/client/client_suite_test.go @@ -19,11 +19,31 @@ package client import ( "testing" + "github.com/go-resty/resty/v2" + "github.com/jarcoal/httpmock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) +var defaultClient *resty.Client + func TestClient(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Client Suite") } + +var _ = BeforeSuite(func() { + defaultClient = resty.New() + defaultClient.SetDebug(true) + // block all HTTP requests + httpmock.ActivateNonDefault(defaultClient.GetClient()) +}) + +var _ = BeforeEach(func() { + // remove any mocks + httpmock.Reset() +}) + +var _ = AfterSuite(func() { + httpmock.DeactivateAndReset() +}) diff --git a/plugin/client/plugin_options_test.go b/plugin/client/plugin_options_test.go index 9667b9f9..a8f8840a 100644 --- a/plugin/client/plugin_options_test.go +++ b/plugin/client/plugin_options_test.go @@ -33,17 +33,7 @@ import ( ) func TestSecretOpts(t *testing.T) { - secretData := map[string][]byte{ - "username": []byte("123"), - "password": []byte("456"), - } - - secret := v1.Secret{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{}, - Type: v1.SecretTypeBasicAuth, - Data: secretData, - } + secret := secretForTest() opt := SecretOpts(secret) request := resty.New().R() @@ -97,6 +87,21 @@ func TestSecretOptsWithRealFile(t *testing.T) { g.Expect(request.Header.Get(PluginSecretHeader)).To(Equal(base64.StdEncoding.EncodeToString(dataBytes))) } +func secretForTest() v1.Secret { + secretData := map[string][]byte{ + "username": []byte("123"), + "password": []byte("456"), + } + + secret := v1.Secret{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{}, + Type: v1.SecretTypeBasicAuth, + Data: secretData, + } + return secret +} + func parseSecret(path string) v1.Secret { filename, err := filepath.Abs(path) if err != nil { diff --git a/plugin/client/testcase_test.go b/plugin/client/testcase_test.go new file mode 100644 index 00000000..d7fb41b1 --- /dev/null +++ b/plugin/client/testcase_test.go @@ -0,0 +1,86 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestCase", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestCases", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testcases.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestCase(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + + Describe("Get TestCase", func() { + It("returns a test case detail", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File("testdata/fixtures/testcase.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.TestCaseID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + testCase, err := pluginClient.TestCase(meta, secret).Get(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(testCase.Spec.ID).To(Equal("ACP-82296")) + }) + }) +}) diff --git a/plugin/client/testcaseexecution.go b/plugin/client/testcaseexecution.go index 5cb5cdec..279fbe70 100644 --- a/plugin/client/testcaseexecution.go +++ b/plugin/client/testcaseexecution.go @@ -66,7 +66,9 @@ func (p *testCaseExecution) List(ctx context.Context, params.TestPlanID, params.TestCaseID, ) - options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list)) + options = append(options, MetaOpts(p.meta), SecretOpts(p.secret), ResultOpts(list), QueryOpts(map[string]string{ + "buildID": params.BuildID, + })) if err := p.client.Get(ctx, baseURL, uri, options...); err != nil { return nil, err } diff --git a/plugin/client/testcaseexecution_test.go b/plugin/client/testcaseexecution_test.go new file mode 100644 index 00000000..b6a8b677 --- /dev/null +++ b/plugin/client/testcaseexecution_test.go @@ -0,0 +1,99 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestCaseExecution", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestCaseExecutions", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testcaseexecutions.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s/executions?buildID=%s", meta.BaseURL, + opt.Project, + opt.TestPlanID, + opt.TestCaseID, + opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestCaseExecution(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(4)) + }) + }) + + Describe("Post TestCaseExecution", func() { + It("creates a test case execution", func() { + responder := httpmock.NewJsonResponderOrPanic( + 200, httpmock.File("testdata/fixtures/testcaseexecution.json"), + ) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + TestCaseID: "ACP-82296", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testcases/%s/executions", meta.BaseURL, + opt.Project, + opt.TestPlanID, opt.TestCaseID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("POST", fakeUrl, responder) + execution, err := pluginClient.TestCaseExecution(meta, secret). + Create(ctx, &duckv1.Addressable{URL: url}, opt, + v1alpha1.TestCaseExecution{ + Spec: v1alpha1.TestCaseExecutionSpec{ + Status: v1alpha1.TestcaseExecutionStatusPassed, + }, + }) + Expect(err).To(BeNil()) + Expect(execution.Spec.Status).To(Equal(v1alpha1.TestcaseExecutionStatusPassed)) + }) + }) +}) diff --git a/plugin/client/testdata/fixtures/testcase.json b/plugin/client/testdata/fixtures/testcase.json new file mode 100644 index 00000000..52f45596 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcase.json @@ -0,0 +1,79 @@ +{ + "kind": "TestCase", + "apiVersion": "v1alpha1", + "metadata": { + "name": "验证拓扑图内按钮操作正确", + "creationTimestamp": "2022-06-14T01:49:23Z" + }, + "spec": { + "id": "ACP-82296", + "type": "手工", + "prerequisite": "", + "steps": [ + { + "id": "533916", + "description": "\u003cp\u003e点击图例下拉框,查看内容与颜色对应关系\u003c/p\u003e\n", + "order": "1", + "expect": "\u003cp\u003e1.关联关系:橙色\u003c/p\u003e\n\n\u003cp\u003e2.所属关系:灰色\u003c/p\u003e\n\n\u003cp\u003e3.挂载关系:蓝色\u003c/p\u003e\n\n\u003cp\u003e4.引用关系:紫色\u003c/p\u003e\n\n\u003cp\u003e5.挂载和引用关系:绿色\u003c/p\u003e\n" + }, + { + "id": "533917", + "description": "\u003cp\u003e点击刷新按钮\u003c/p\u003e\n", + "order": "2", + "expect": "\u003cp\u003e界面有loading效果\u003c/p\u003e\n" + }, + { + "id": "533918", + "description": "\u003cp\u003e点击全景视图按钮\u003c/p\u003e\n", + "order": "3", + "expect": "\u003cp\u003e当前拓扑图中的所有卡片,上下左右居中显示\u003c/p\u003e\n" + }, + { + "id": "533919", + "description": "\u003cp\u003e点击放大按钮\u003c/p\u003e\n", + "order": "4", + "expect": "\u003cp\u003e默认为100%,每次点击放大后缩放比例加10%,拓扑图放大\u003c/p\u003e\n" + }, + { + "id": "533920", + "description": "\u003cp\u003e点击缩小按钮\u003c/p\u003e\n", + "order": "5", + "expect": "\u003cp\u003e默认为100%,每次点击后缩放比例减10%,拓扑图缩小\u003c/p\u003e\n" + }, + { + "id": "533921", + "description": "\u003cp\u003e当缩放比例不为100%时,点击1:1\u003c/p\u003e\n", + "order": "6", + "expect": "\u003cp\u003e缩放比例还原到100%,拓扑图恢复到最初大小\u003c/p\u003e\n" + } + ], + "createdBy": { + "id": "36", + "name": "myliu" + }, + "priority": "高", + "relatedRequirements": [ + { + "title": "REQ-5112", + "targetURL": "" + } + ], + "relatedBugs": [] + }, + "status": { + "lastExecution": { + "testPlanId": "387013", + "buildRef": { + "name": "回归测试", + "id": "1140" + }, + "status": "passed", + "createdAt": "2022-08-18T07:50:39Z", + "createdBy": { + "id": "45", + "name": "admin", + "email": "admin@cpaas.io" + } + } + } +} diff --git a/plugin/client/testdata/fixtures/testcaseexecution.json b/plugin/client/testdata/fixtures/testcaseexecution.json new file mode 100644 index 00000000..83f0f2d3 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcaseexecution.json @@ -0,0 +1,22 @@ +{ + "kind": "TestCaseExecution", + "apiVersion": "meta.katanomi.dev/v1alpha1", + "metadata": { + "name": "464488", + "namespace": "devops", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "", + "buildRef": { + "name": "", + "id": "1140" + }, + "status": "passed", + "createdAt": null, + "createdBy": { + "name": "admin", + "email": "admin@cpaas.io" + } + } +} diff --git a/plugin/client/testdata/fixtures/testcaseexecutions.json b/plugin/client/testdata/fixtures/testcaseexecutions.json new file mode 100644 index 00000000..07f1239f --- /dev/null +++ b/plugin/client/testdata/fixtures/testcaseexecutions.json @@ -0,0 +1,87 @@ +{ + "metadata": { + "totalItems": 4 + }, + "items": [ + { + "metadata": { + "name": "24", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "passed", + "createdAt": "2022-08-18T10:23:52Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "23", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "failed", + "createdAt": "2022-08-18T10:23:42Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "22", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "blocked", + "createdAt": "2022-08-18T10:23:11Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + }, + { + "metadata": { + "name": "21", + "creationTimestamp": null + }, + "spec": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "failed", + "createdAt": "2022-08-18T10:22:59Z", + "createdBy": { + "id": "1", + "name": "admin", + "email": "admin@cpaas.io" + } + } + } + ] +} \ No newline at end of file diff --git a/plugin/client/testdata/fixtures/testcases.json b/plugin/client/testdata/fixtures/testcases.json new file mode 100644 index 00000000..4b55a770 --- /dev/null +++ b/plugin/client/testdata/fixtures/testcases.json @@ -0,0 +1,37 @@ +{ + "metadata": { + "totalItems": 1 + }, + "items": [ + { + "kind": "TestCase", + "apiVersion": "v1alpha1", + "metadata": { + "name": "testcase1", + "creationTimestamp": null + }, + "spec": { + "id": "t2-1", + "type": "", + "prerequisite": "", + "steps": null, + "createdBy": {}, + "priority": "", + "relatedRequirements": null, + "relatedBugs": null + }, + "status": { + "lastExecution": { + "testPlanId": "36", + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "status": "passed", + "createdAt": null, + "createdBy": {} + } + } + } + ] +} diff --git a/plugin/client/testdata/fixtures/testmodules.json b/plugin/client/testdata/fixtures/testmodules.json new file mode 100644 index 00000000..96f24f1d --- /dev/null +++ b/plugin/client/testdata/fixtures/testmodules.json @@ -0,0 +1,29 @@ +{ + "metadata": { + "totalItems": 1 + }, + "items": [ + { + "kind": "TestModule", + "apiVersion": "v1alpha1", + "metadata": { + "name": "topsuite", + "creationTimestamp": null + }, + "spec": { + "id": "33", + "order": 1, + "parentID": "", + "testCases": [ + { + "ref": { + "name": "testcase1", + "id": "t2-1" + }, + "order": 1000 + } + ] + } + } + ] +} diff --git a/plugin/client/testdata/fixtures/testplan.json b/plugin/client/testdata/fixtures/testplan.json new file mode 100644 index 00000000..43b4ba76 --- /dev/null +++ b/plugin/client/testdata/fixtures/testplan.json @@ -0,0 +1,42 @@ +{ + "kind": "TestPlan", + "apiVersion": "v1alpha1", + "metadata": { + "name": "12.6asm交付-回归测试", + "creationTimestamp": null + }, + "spec": { + "id": "387013", + "assignee": {}, + "createdBy": {}, + "buildRefs": [ + { + "name": "回归测试", + "id": "1140" + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": null, + "reason": "Running" + } + ], + "buildRef": { + "name": "回归测试", + "id": "1140" + }, + "executable": true, + "testBuildStatus": { + "totalCases": 107, + "passed": 88, + "failed": 0, + "blocked": 1, + "waiting": 18, + "passRate": 0.822429906542056 + } + } +} diff --git a/plugin/client/testdata/fixtures/testplans.json b/plugin/client/testdata/fixtures/testplans.json new file mode 100644 index 00000000..fa872719 --- /dev/null +++ b/plugin/client/testdata/fixtures/testplans.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "totalItems": 1, + "page": 1, + "itemsPerPage": 20 + }, + "items": [ + { + "kind": "TestPlan", + "apiVersion": "v1alpha1", + "metadata": { + "name": "testplan1", + "creationTimestamp": null + }, + "spec": { + "id": "36", + "assignee": {}, + "createdBy": {}, + "buildRefs": [ + { + "name": "test2version1", + "id": "11" + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": null, + "reason": "Succeeded" + } + ], + "buildRef": { + "name": "test2version1", + "id": "11" + }, + "executable": true, + "testBuildStatus": { + "totalCases": 1, + "passed": 1, + "failed": 0, + "blocked": 0, + "waiting": 0, + "passRate": 1 + } + } + } + ] +} \ No newline at end of file diff --git a/plugin/client/testmodule_test.go b/plugin/client/testmodule_test.go new file mode 100644 index 00000000..2bd0d0eb --- /dev/null +++ b/plugin/client/testmodule_test.go @@ -0,0 +1,66 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestModules", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestModules", func() { + It("returns a list of test cases", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testmodules.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s/testmodules", meta.BaseURL, opt.Project, + opt.TestPlanID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestModule(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + +}) diff --git a/plugin/client/testplan_test.go b/plugin/client/testplan_test.go new file mode 100644 index 00000000..f09dd914 --- /dev/null +++ b/plugin/client/testplan_test.go @@ -0,0 +1,84 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "fmt" + + "github.com/jarcoal/httpmock" + "github.com/katanomi/pkg/apis/meta/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" +) + +var _ = Describe("TestPlan", func() { + var pluginClient *PluginClient + var meta Meta + var secret v1.Secret + var ctx context.Context + + BeforeEach(func() { + pluginClient = NewPluginClient(ClientOpts(defaultClient)) + meta.BaseURL = "https://alauda.io" + secret = secretForTest() + ctx = context.Background() + }) + + Describe("List TestPlans", func() { + It("returns a list of test plans", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File( + "testdata/fixtures/testplans.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "123", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans", meta.BaseURL, opt.Project) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + list, err := pluginClient.TestPlan(meta, secret).List(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(list.Items).To(HaveLen(1)) + }) + }) + + Describe("Get TestPlan", func() { + It("returns a test plan detail", func() { + responder := httpmock.NewJsonResponderOrPanic(200, httpmock.File("testdata/fixtures/testplan.json")) + + opt := v1alpha1.TestProjectOptions{ + Project: "xxx", + TestPlanID: "387013", + BuildID: "456", + } + + fakeUrl := fmt.Sprintf("%s/projects/%s/testplans/%s?buildID=%s", meta.BaseURL, opt.Project, + opt.TestPlanID, opt.BuildID) + url, _ := apis.ParseURL(meta.BaseURL) + httpmock.RegisterResponder("GET", fakeUrl, responder) + testPlan, err := pluginClient.TestPlan(meta, secret).Get(ctx, &duckv1.Addressable{URL: url}, opt) + Expect(err).To(BeNil()) + Expect(testPlan.Spec.ID).To(Equal("387013")) + }) + }) +}) From a21522453c344de6ca8fff6eebb58329bbb53a12 Mon Sep 17 00:00:00 2001 From: jzli Date: Mon, 22 Aug 2022 17:02:31 +0800 Subject: [PATCH 11/13] fix: reviewdog issue --- plugin/client/testdata/fixtures/testcaseexecutions.json | 2 +- plugin/client/testdata/fixtures/testplans.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/client/testdata/fixtures/testcaseexecutions.json b/plugin/client/testdata/fixtures/testcaseexecutions.json index 07f1239f..be0282c9 100644 --- a/plugin/client/testdata/fixtures/testcaseexecutions.json +++ b/plugin/client/testdata/fixtures/testcaseexecutions.json @@ -84,4 +84,4 @@ } } ] -} \ No newline at end of file +} diff --git a/plugin/client/testdata/fixtures/testplans.json b/plugin/client/testdata/fixtures/testplans.json index fa872719..b8947f3c 100644 --- a/plugin/client/testdata/fixtures/testplans.json +++ b/plugin/client/testdata/fixtures/testplans.json @@ -48,4 +48,4 @@ } } ] -} \ No newline at end of file +} From a5cc39e1a3d9f845089ba9ac80ed5287db68ded3 Mon Sep 17 00:00:00 2001 From: jzli Date: Tue, 23 Aug 2022 15:30:15 +0800 Subject: [PATCH 12/13] fix: test coverage --- plugin/route/testcase.go | 2 +- plugin/route/testcase_test.go | 131 +++++++++++++++++++++++ plugin/route/testcaseexecution_test.go | 141 +++++++++++++++++++++++++ plugin/route/testmodule_test.go | 83 +++++++++++++++ plugin/route/testplan_test.go | 131 +++++++++++++++++++++++ 5 files changed, 487 insertions(+), 1 deletion(-) create mode 100644 plugin/route/testcase_test.go create mode 100644 plugin/route/testcaseexecution_test.go create mode 100644 plugin/route/testmodule_test.go create mode 100644 plugin/route/testplan_test.go diff --git a/plugin/route/testcase.go b/plugin/route/testcase.go index 208a1063..c9d8c9af 100644 --- a/plugin/route/testcase.go +++ b/plugin/route/testcase.go @@ -42,7 +42,7 @@ func NewTestCaseLister(impl client.TestCaseLister) Route { func (r *testCaseLister) Register(ws *restful.WebService) { projectParam := ws.PathParameter("project", "testCase belong to integraion") testPlanIDParam := ws.PathParameter("testplanid", "test plan id") - buildIDParam := ws.PathParameter("buildID", "test plan id") + buildIDParam := ws.QueryParameter("buildID", "test plan id") ws.Route( ListOptionsDocs( ws.GET("/projects/{project:*}/testplans/{testplanid:*}/testcases").To(r.ListTestCases). diff --git a/plugin/route/testcase_test.go b/plugin/route/testcase_test.go new file mode 100644 index 00000000..3e69683f --- /dev/null +++ b/plugin/route/testcase_test.go @@ -0,0 +1,131 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "context" + "encoding/base64" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + + "github.com/emicklei/go-restful/v3" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + "github.com/katanomi/pkg/plugin/client" + "go.uber.org/zap" +) + +func TestListTestCases(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestCaseLister{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testcase/projects/xxx/testplans/yyy/testcases", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testCaseList := metav1alpha1.TestCaseList{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testCaseList) + g.Expect(err).To(BeNil()) + g.Expect(testCaseList.Kind).To(Equal(metav1alpha1.TestCaseListGVK.Kind)) +} + +func TestGetTestCase(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestCaseGetter{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testcase/projects/xxx/testplans/yyy/testcases/xxx", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testCase := metav1alpha1.TestCase{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testCase) + g.Expect(err).To(BeNil()) + g.Expect(testCase.Kind).To(Equal(metav1alpha1.TestCaseGVK.Kind)) +} + +type TestTestCaseLister struct { +} + +func (t *TestTestCaseLister) ListTestCases(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseList, error) { + return &metav1alpha1.TestCaseList{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestCaseListGVK.Kind, + }, + }, nil +} + +func (t *TestTestCaseLister) Path() string { + return "test-testcase" +} + +func (t *TestTestCaseLister) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} + +type TestTestCaseGetter struct { +} + +func (t *TestTestCaseGetter) GetTestCase(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestCase, error) { + return &metav1alpha1.TestCase{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestCaseGVK.Kind, + }, + }, nil +} +func (t *TestTestCaseGetter) Path() string { + return "test-testcase" +} + +func (t *TestTestCaseGetter) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} diff --git a/plugin/route/testcaseexecution_test.go b/plugin/route/testcaseexecution_test.go new file mode 100644 index 00000000..7969b3a8 --- /dev/null +++ b/plugin/route/testcaseexecution_test.go @@ -0,0 +1,141 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + + "github.com/emicklei/go-restful/v3" + "github.com/katanomi/integrations-testlink/pkg/response" + . "github.com/onsi/gomega" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + "github.com/katanomi/pkg/plugin/client" + "go.uber.org/zap" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestListTestCaseExecutions(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestCaseExecutionLister{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testcaseexecution/projects/xxx/testplans/yyy/testcases/xxx/executions", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testCaseExecutionList := metav1alpha1.TestCaseExecutionList{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testCaseExecutionList) + g.Expect(err).To(BeNil()) + g.Expect(testCaseExecutionList.Kind).To(Equal(metav1alpha1.TestCaseExecutionListGVK.Kind)) +} + +func TestCreateTestCaseExecution(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestCaseExecutionCreator{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + body := metav1alpha1.TestCaseExecution{ + Spec: metav1alpha1.TestCaseExecutionSpec{ + Status: response.TestCaseExecutionStatusPassed, + }, + } + bodyMarshal, _ := json.Marshal(body) + httpRequest, _ := http.NewRequest("POST", + "/plugins/v1alpha1/test-testcaseexecution/projects/xxx/testplans/yyy/testcases/123/executions", + bytes.NewBuffer(bodyMarshal)) + httpRequest.Header.Set("Accept", "application/json") + httpRequest.Header.Set("Content-Type", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testCaseExecution := metav1alpha1.TestCaseExecution{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testCaseExecution) + g.Expect(err).To(BeNil()) + g.Expect(testCaseExecution.Kind).To(Equal(metav1alpha1.TestCaseExecutionGVK.Kind)) +} + +type TestTestCaseExecutionLister struct { +} + +func (t *TestTestCaseExecutionLister) ListTestCaseExecutions(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestCaseExecutionList, error) { + return &metav1alpha1.TestCaseExecutionList{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestCaseExecutionListGVK.Kind, + }, + }, nil +} + +func (t *TestTestCaseExecutionLister) Path() string { + return "test-testcaseexecution" +} + +func (t *TestTestCaseExecutionLister) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} + +type TestTestCaseExecutionCreator struct { +} + +func (t *TestTestCaseExecutionCreator) CreateTestCaseExecution(ctx context.Context, params metav1alpha1.TestProjectOptions, payload metav1alpha1.TestCaseExecution) (*metav1alpha1.TestCaseExecution, error) { + return &metav1alpha1.TestCaseExecution{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestCaseExecutionGVK.Kind, + }, + }, nil +} +func (t *TestTestCaseExecutionCreator) Path() string { + return "test-testcaseexecution" +} + +func (t *TestTestCaseExecutionCreator) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} diff --git a/plugin/route/testmodule_test.go b/plugin/route/testmodule_test.go new file mode 100644 index 00000000..cbf975de --- /dev/null +++ b/plugin/route/testmodule_test.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "context" + "encoding/base64" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + + "github.com/emicklei/go-restful/v3" + . "github.com/onsi/gomega" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + "github.com/katanomi/pkg/plugin/client" + "go.uber.org/zap" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestListTestModules(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestModuleLister{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testmodule/projects/xxx/testplans/yyy/testmodules", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testModuleList := metav1alpha1.TestModuleList{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testModuleList) + g.Expect(err).To(BeNil()) + g.Expect(testModuleList.Kind).To(Equal(metav1alpha1.TestModuleListGVK.Kind)) +} + +type TestTestModuleLister struct { +} + +func (t *TestTestModuleLister) ListTestModules(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestModuleList, error) { + return &metav1alpha1.TestModuleList{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestModuleListGVK.Kind, + }, + }, nil +} + +func (t *TestTestModuleLister) Path() string { + return "test-testmodule" +} + +func (t *TestTestModuleLister) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} diff --git a/plugin/route/testplan_test.go b/plugin/route/testplan_test.go new file mode 100644 index 00000000..bcfa062b --- /dev/null +++ b/plugin/route/testplan_test.go @@ -0,0 +1,131 @@ +/* +Copyright 2022 The Katanomi Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package route + +import ( + "context" + "encoding/base64" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + + "github.com/emicklei/go-restful/v3" + . "github.com/onsi/gomega" + + metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" + "github.com/katanomi/pkg/plugin/client" + "go.uber.org/zap" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestListTestPlans(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestPlanLister{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testplan/projects/xxx/testplans", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testPlanList := metav1alpha1.TestPlanList{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testPlanList) + g.Expect(err).To(BeNil()) + g.Expect(testPlanList.Kind).To(Equal(metav1alpha1.TestPlanListGVK.Kind)) +} + +func TestGetTestPlan(t *testing.T) { + g := NewGomegaWithT(t) + + ws, err := NewService(&TestTestPlanGetter{}, client.MetaFilter) + g.Expect(err).To(BeNil()) + + container := restful.NewContainer() + + container.Add(ws) + + httpRequest, _ := http.NewRequest("GET", + "/plugins/v1alpha1/test-testplan/projects/xxx/testplans/yyy", nil) + httpRequest.Header.Set("Accept", "application/json") + + metaData := client.Meta{BaseURL: "http://api.test", Version: "v1"} + data, _ := json.Marshal(metaData) + meta := base64.StdEncoding.EncodeToString(data) + httpRequest.Header.Set(client.PluginMetaHeader, meta) + + httpWriter := httptest.NewRecorder() + + container.Dispatch(httpWriter, httpRequest) + g.Expect(httpWriter.Code).To(Equal(http.StatusOK)) + + testPlan := metav1alpha1.TestPlan{} + err = json.Unmarshal(httpWriter.Body.Bytes(), &testPlan) + g.Expect(err).To(BeNil()) + g.Expect(testPlan.Kind).To(Equal(metav1alpha1.TestPlanGVK.Kind)) +} + +type TestTestPlanLister struct { +} + +func (t *TestTestPlanLister) ListTestPlans(ctx context.Context, params metav1alpha1.TestProjectOptions, options metav1alpha1.ListOptions) (*metav1alpha1.TestPlanList, error) { + return &metav1alpha1.TestPlanList{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestPlanListGVK.Kind, + }, + }, nil +} + +func (t *TestTestPlanLister) Path() string { + return "test-testplan" +} + +func (t *TestTestPlanLister) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} + +type TestTestPlanGetter struct { +} + +func (t *TestTestPlanGetter) GetTestPlan(ctx context.Context, params metav1alpha1.TestProjectOptions) (*metav1alpha1.TestPlan, error) { + return &metav1alpha1.TestPlan{ + TypeMeta: metav1.TypeMeta{ + Kind: metav1alpha1.TestPlanGVK.Kind, + }, + }, nil +} +func (t *TestTestPlanGetter) Path() string { + return "test-testplan" +} + +func (t *TestTestPlanGetter) Setup(_ context.Context, _ *zap.SugaredLogger) error { + return nil +} From f0ebbb94bb3fea72a92a80c2bd42836bcb7a0a6b Mon Sep 17 00:00:00 2001 From: jzli Date: Tue, 23 Aug 2022 15:38:21 +0800 Subject: [PATCH 13/13] fix: pkg import --- plugin/route/testcaseexecution_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/route/testcaseexecution_test.go b/plugin/route/testcaseexecution_test.go index 7969b3a8..26a53184 100644 --- a/plugin/route/testcaseexecution_test.go +++ b/plugin/route/testcaseexecution_test.go @@ -26,7 +26,6 @@ import ( "testing" "github.com/emicklei/go-restful/v3" - "github.com/katanomi/integrations-testlink/pkg/response" . "github.com/onsi/gomega" metav1alpha1 "github.com/katanomi/pkg/apis/meta/v1alpha1" @@ -77,7 +76,7 @@ func TestCreateTestCaseExecution(t *testing.T) { body := metav1alpha1.TestCaseExecution{ Spec: metav1alpha1.TestCaseExecutionSpec{ - Status: response.TestCaseExecutionStatusPassed, + Status: metav1alpha1.TestcaseExecutionStatusPassed, }, } bodyMarshal, _ := json.Marshal(body)