From fb54c32fc89932e9e37487f88fc127f3369afbdd Mon Sep 17 00:00:00 2001 From: Ce Gao Date: Fri, 17 May 2019 13:15:23 +0800 Subject: [PATCH] chore: Add mockgen and test crd Signed-off-by: Ce Gao --- scripts/mockgen.sh | 6 ++++-- test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml | 12 ++++++++++++ test/unit/v1alpha2/crds/tfjob_v1beta2.yaml | 12 ++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml create mode 100644 test/unit/v1alpha2/crds/tfjob_v1beta2.yaml diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index 8377b7154a3..3e66c08bbd7 100755 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -36,7 +36,9 @@ echo "Generating v1alpha2 SuggestionClient..." mockgen -package mock -destination pkg/mock/v1alpha2/api/suggestion.go github.com/kubeflow/katib/pkg/api/v1alpha2 SuggestionClient echo "Generating v1alpha2 KatibDBInterface..." mockgen -package mock -destination pkg/mock/v1alpha2/db/db.go github.com/kubeflow/katib/pkg/db/v1alpha2 KatibDBInterface -echo "Generating v1alpha2 Producer..." -mockgen -package mock -destination pkg/mock/v1alpha2/experiment/manifest/producer.go github.com/kubeflow/katib/pkg/controller/v1alpha2/experiment/manifest Producer +echo "Generating v1alpha2 Generator..." +mockgen -package mock -destination pkg/mock/v1alpha2/experiment/manifest/producer.go github.com/kubeflow/katib/pkg/controller/v1alpha2/experiment/manifest Generator echo "Generating v1alpha2 KatibClient..." mockgen -package mock -destination pkg/mock/v1alpha2/util/katibclient/katibclient.go github.com/kubeflow/katib/pkg/util/v1alpha2/katibclient Client +echo "Generating v1alpha2 ManagerClient in Trial Controller..." +mockgen -package mock -destination pkg/mock/v1alpha2/trial/managerclient/katibmanager.go github.com/kubeflow/katib/pkg/controller/v1alpha2/trial/managerclient ManagerClient diff --git a/test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml b/test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml new file mode 100644 index 00000000000..e46e614cbb0 --- /dev/null +++ b/test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml @@ -0,0 +1,12 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: pytorchjobs.kubeflow.org +spec: + group: kubeflow.org + version: v1beta2 + scope: Namespaced + names: + kind: PyTorchJob + singular: pytorchjob + plural: pytorchjobs diff --git a/test/unit/v1alpha2/crds/tfjob_v1beta2.yaml b/test/unit/v1alpha2/crds/tfjob_v1beta2.yaml new file mode 100644 index 00000000000..2c8b8a2fb89 --- /dev/null +++ b/test/unit/v1alpha2/crds/tfjob_v1beta2.yaml @@ -0,0 +1,12 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: tfjobs.kubeflow.org +spec: + group: kubeflow.org + version: v1beta2 + scope: Namespaced + names: + kind: TFJob + singular: tfjob + plural: tfjobs