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

E2E - Config Server tooling and test cases #89

Conversation

chandrareddyp
Copy link
Contributor

@chandrareddyp chandrareddyp commented Mar 3, 2023

What this PR does / why we need it

This PR implements the end-to-end test cases and tooling for tanzu config server commands - tanzu config server list and tanzu config server delete
The existing KIND cluster tooling has been used to create context (server in this use case) and implement these E2E test cases.
Use cases covered in this PR:

tanzu config server list
tanzu config server delete

It uses the Context tooling to create the servers

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

Successfully executed the config e2e test cases locally:

❯ export PATH=/Users/cpamuluri/tkg/tasks/e2e_tests/core_main/tanzu-cli/bin:/Users/cpamuluri/tkg/tasks/e2e_tests/core_main/tanzu-cli/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/cpamuluri/.fig/bin:/Users/cpamuluri/.local/bin
❯ 
❯ go test ./test/e2e/config -timeout 60m -race -coverprofile coverage.txt -v
=== RUN   TestConfig
Running Suite: Config Suite
===========================
Random Seed: 1679095791
Will run 9 of 9 specs

••••••••[x] error while running: tanzu config server delete 3h2Y -y: error while running 'tanzu config server delete 3h2Y -y', stdOut: , stdErr: [i] Deleting entry for cluster 3h2Y
[x] : server 3h2Y not found in list of known servers
%!(EXTRA *exec.ExitError=exit status 1)
•
Ran 9 of 9 Specs in 26.325 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestConfig (26.34s)
PASS
coverage: [no statements]
ok      github.com/vmware-tanzu/tanzu-cli/test/e2e/config       26.816s coverage: [no statements]
❯ 

Release note

E2E tests for `tanzu config server` implemented

Additional information

Special notes for your reviewer

@anujc25
Copy link
Contributor

anujc25 commented Mar 3, 2023

Please update the title to be more specific. Also, provide more details about the tests as part of the PR description and release notes.

@chandrareddyp chandrareddyp changed the title E2E - test cases implementation E2E - Config Server tooling and test cases Mar 6, 2023
@chandrareddyp chandrareddyp force-pushed the topic/cpamuluri/config_server_tests branch 2 times, most recently from 3b80e5b to ea1d037 Compare March 6, 2023 23:08
@chandrareddyp chandrareddyp force-pushed the topic/cpamuluri/config_server_tests branch 5 times, most recently from 4b5847f to 34e949d Compare March 8, 2023 15:22
@chandrareddyp chandrareddyp force-pushed the topic/cpamuluri/config_server_tests branch from 7025a3a to 53fe5c3 Compare March 16, 2023 03:17
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chandrareddyp chandrareddyp merged commit 5964257 into vmware-tanzu:main Mar 16, 2023
vuil pushed a commit that referenced this pull request Mar 20, 2023
Co-authored-by: Chandra Pamuluri <cpamuluri@cpamuluri-a01.vmware.com>
@vuil vuil added the kind/testing Categorizes issue or PR as related to testing label Apr 7, 2023
@marckhouzam marckhouzam added this to the v0.90.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required kind/testing Categorizes issue or PR as related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants