Skip to content

Commit

Permalink
test: Generate apply configutions for e2e APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti committed Mar 28, 2023
1 parent 143a1e2 commit f4a9593
Show file tree
Hide file tree
Showing 13 changed files with 988 additions and 2 deletions.
22 changes: 20 additions & 2 deletions hack/update-codegen-clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,32 @@ ${CODE_GENERATOR} \
"output:dir=./../client"
popd

"$GOPATH"/bin/applyconfiguration-gen \
--input-dirs github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis/wildwest/v1alpha1 \
--input-dirs k8s.io/apimachinery/pkg/apis/meta/v1 \
--output-package github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/applyconfiguration \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
--output-base "${SCRIPT_ROOT}" \
--trim-path-prefix github.com/kcp-dev/kcp

"$GOPATH"/bin/client-gen \
--input github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis/wildwest/v1alpha1 \
--input-base="" \
--apply-configuration-package=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/applyconfiguration \
--clientset-name "versioned" \
--output-package github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/clientset \
--go-header-file ./hack/../hack/boilerplate/boilerplate.generatego.txt \
--output-base "${SCRIPT_ROOT}" \
--trim-path-prefix github.com/kcp-dev/kcp

bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy" \
github.com/kcp-dev/kcp/third_party/conditions/client github.com/kcp-dev/kcp/third_party/conditions/apis \
"conditions:v1alpha1" \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
--output-base "${SCRIPT_ROOT}" \
--trim-path-prefix github.com/kcp-dev/kcp

bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client" \
bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy" \
github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis \
"wildwest:v1alpha1" \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
Expand All @@ -93,7 +111,7 @@ bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client" \

pushd ./test/e2e/fixtures/wildwest/apis
${CODE_GENERATOR} \
"client:outputPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client,apiPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis,singleClusterClientPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/clientset/versioned,headerFile=${BOILERPLATE_HEADER}" \
"client:outputPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client,apiPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis,singleClusterClientPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/clientset/versioned,singleClusterApplyConfigurationsPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/applyconfiguration,headerFile=${BOILERPLATE_HEADER}" \
"lister:apiPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis,headerFile=${BOILERPLATE_HEADER}" \
"informer:outputPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client,singleClusterClientPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/clientset/versioned,apiPackagePath=github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis,headerFile=${BOILERPLATE_HEADER}" \
"paths=./..." \
Expand Down

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

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

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

Loading

0 comments on commit f4a9593

Please sign in to comment.