Skip to content

Commit

Permalink
chore: Add mockgen and test crd
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege committed May 17, 2019
1 parent d276385 commit fb54c32
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/mockgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions test/unit/v1alpha2/crds/pytorchjob_v1beta2.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions test/unit/v1alpha2/crds/tfjob_v1beta2.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fb54c32

Please sign in to comment.