Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to disable oci client init on startup #243

Conversation

shyamradhakrishnan
Copy link
Contributor

@shyamradhakrishnan shyamradhakrishnan commented Apr 12, 2023

What this PR does / why we need it:

Add ability to disable OCI client init on startup

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #244

@shyamradhakrishnan shyamradhakrishnan self-assigned this Apr 12, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 12, 2023
@shyamradhakrishnan shyamradhakrishnan force-pushed the add_ablility_to_disable_oci_client_init_on_startup branch from 2058ad8 to 6948481 Compare April 12, 2023 02:48
@shyamradhakrishnan
Copy link
Contributor Author

unit test

KUBEBUILDER_ASSETS="/home/ubuntu/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
?   	github.com/oracle/cluster-api-provider-oci	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta1	37.635s	coverage: 23.9% of statements
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta2	0.038s	coverage: 16.3% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/config	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/ociutil	0.004s	coverage: 19.6% of statements
ok  	github.com/oracle/cluster-api-provider-oci/cloud/scope	230.734s	coverage: 77.3% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/compute	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/identity	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/vcn	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/util	0.029s	coverage: 60.0% of statements
ok  	github.com/oracle/cluster-api-provider-oci/controllers	25.853s	coverage: 67.5% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1	26.821s	coverage: 21.8% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2	0.024s	coverage: 11.0% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/controllers	0.729s	coverage: 56.3% of statements
?   	github.com/oracle/cluster-api-provider-oci/feature	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/version	[no test files]
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

@shyamradhakrishnan
Copy link
Contributor Author

e2e test

------------------------------

Ran 6 of 25 Specs in 3711.202 seconds
SUCCESS! -- 6 Passed | 0 Failed | 0 Pending | 19 Skipped

@shyamradhakrishnan shyamradhakrishnan marked this pull request as ready for review April 12, 2023 04:20
joekr
joekr previously approved these changes Apr 12, 2023
docs/src/gs/advanced.md Show resolved Hide resolved
docs/src/gs/advanced.md Show resolved Hide resolved
@shyamradhakrishnan shyamradhakrishnan merged commit 8e9a249 into oracle:main Apr 14, 2023
shyamradhakrishnan added a commit that referenced this pull request Apr 19, 2023
* Add option to disable OCI client init on startup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to disable oci client init on startup
2 participants