File tree 10 files changed +46
-231
lines changed
test/test-framework/pkg/apis/cache/v1alpha1 10 files changed +46
-231
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,14 @@ tidy: ## Update dependencies
54
54
clean : # # Clean up the build artifacts
55
55
$(Q ) rm -rf build
56
56
57
- cli-doc : # # Generate CLI Documentation
58
- ./hack/doc/gen_cli_doc.sh
57
+ gen-cli-doc : # # Generate CLI documentation
58
+ ./hack/generate/gen-cli-doc.sh
59
+
60
+ gen-test-framework : install # # Run generate commands to update test/test-framework
61
+ ./hack/generate/gen-test-framework.sh
62
+
63
+ generate : gen-cli-doc gen-test-framework # # Run all generate targets
64
+ .PHONY : generate gen-cli-doc gen-test-framework
59
65
60
66
# Build/install/release the SDK.
61
67
.PHONY : install release_builds release
@@ -112,7 +118,7 @@ test: test-unit ## Run the tests
112
118
test-markdown test/markdown :
113
119
./hack/ci/marker
114
120
115
- test-sanity test/sanity : tidy
121
+ test-sanity test/sanity : tidy build/operator-sdk
116
122
./hack/tests/sanity-check.sh
117
123
118
124
test-unit test/unit : # # Run the unit tests
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ require (
18
18
github.com/ghodss/yaml v1.0.1-0.20180820084758-c7ce16629ff4
19
19
github.com/go-logr/logr v0.1.0
20
20
github.com/go-logr/zapr v0.1.1
21
- github.com/go-openapi/spec v0.19.0
22
21
github.com/gobuffalo/packr v1.30.1 // indirect
23
22
github.com/gobwas/glob v0.2.3 // indirect
24
23
github.com/huandu/xstrings v1.2.0 // indirect
File renamed without changes.
File renamed without changes.
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ go run ./hack/generate/gen-cli-doc.go
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # ############################
4
+ # Make sure that test/test-framework is updated according to the current source code
5
+ # ############################
6
+
7
+ set -ex
8
+
9
+ source hack/lib/test_lib.sh
10
+
11
+ # Define vars
12
+ DOCKERFILE=" build/Dockerfile"
13
+
14
+ # Go inside of the mock data test project
15
+ cd test/test-framework
16
+
17
+ # Create the required files in the mock test/test-framework just to allow run from it the oprator-sdk commands
18
+ echo > $DOCKERFILE
19
+ go mod init test-framework
20
+
21
+ # Remove files that are required and created just to exec the commands.
22
+ trap_add ' rm -rf $DOCKERFILE go.mod go.sum' EXIT
23
+
24
+ # Run gen commands
25
+ ../../build/operator-sdk generate k8s
26
+ ../../build/operator-sdk generate openapi
27
+
28
+ # TODO(camilamacedo86): remove this when the openapi gen be set to false and it no longer is generated
29
+ # The following file is gen by openapi but it has not been committed in order to allow we clone and call the test locally in any path.
30
+ trap_add ' rm pkg/apis/cache/v1alpha1/zz_generated.openapi.go' EXIT
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ go mod tidy
5
5
go vet ./...
6
6
go fmt ./...
7
7
8
- ./hack/check_license.sh
9
- ./hack/check_error_log_msg_format.sh
10
- ./hack/doc/gen_cli_doc.sh
8
+ ./hack/check-license.sh
9
+ ./hack/check-error-log-msg-format.sh
10
+ ./hack/generate/gen-cli-doc.sh
11
+ ./hack/generate/gen-test-framework.sh
11
12
12
13
# Make sure repo is still in a clean state.
13
14
git diff --exit-code
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments