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] Add test cases for pre-created VPC #933

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

wenyingd
Copy link
Contributor

@wenyingd wenyingd commented Nov 26, 2024

This change is to add a new end-to-end test for the pre-created VPC, it includes these steps,

  1. Create a VPC/LBS/Attachment on NSX
  2. Create a Namespace on vCenter or K8s, which depends on if the setup is a wcp testbed or not. Note, it planned to run the test on wcp testbed, please provide a valid pair of vc-user and vc-password which has the permission to create instance on vCenter
  3. Create LoadBalancer typed Service inside the Namespace
  4. Create server Pod for the LoadBalancer typed Service
  5. Create client Pod in the same Namespace
  6. Verified the traffic from the client Pod to the LoadBalancer's external IP
  7. Delete LoadBalancer typed Service and verified that the realted NSX resources are removed as expected
  8. Delete the Namespace from vCenter or K8s
  9. Delete the VPC from NSX

@zhengxiexie
Copy link
Contributor

/e2e

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.37%. Comparing base (652107c) to head (f9ba87d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #933   +/-   ##
=======================================
  Coverage   73.37%   73.37%           
=======================================
  Files         118      118           
  Lines       16394    16394           
=======================================
  Hits        12029    12029           
  Misses       3581     3581           
  Partials      784      784           
Flag Coverage Δ
unit-tests 73.37% <ø> (ø)

@wenyingd
Copy link
Contributor Author

/e2e

1 similar comment
@zhengxiexie
Copy link
Contributor

/e2e

@wenyingd
Copy link
Contributor Author

/e2e

@zhengxiexie
Copy link
Contributor

/e2e

1 similar comment
@zhengxiexie
Copy link
Contributor

/e2e

@wenyingd wenyingd force-pushed the e2e_pre_vpc branch 4 times, most recently from db80623 to 994ada6 Compare December 16, 2024 06:24
@wenyingd
Copy link
Contributor Author

/e2e

zhengxiexie
zhengxiexie previously approved these changes Dec 16, 2024
Copy link
Contributor

@zhengxiexie zhengxiexie left a comment

Choose a reason for hiding this comment

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

lgtm

@wenyingd
Copy link
Contributor Author

/e2e

1 similar comment
@wenyingd
Copy link
Contributor Author

/e2e

@wenyingd
Copy link
Contributor Author

/e2e

2 similar comments
@wenyingd
Copy link
Contributor Author

/e2e

@wenyingd
Copy link
Contributor Author

/e2e

@wenyingd
Copy link
Contributor Author

/e2e

This change is to add a new end-to-end test for the pre-created VPC, it includes
these steps,
1. Create a VPC/LBS/Attachment on NSX
2. Create a Namespace on vCenter or K8s, which depends on if the setup is a wcp
testbed or not. Note, it planned to run the test on wcp testbed, please provide
a valid pair of vc-user and vc-password which has the permission to create
instance on vCenter
3. Create LoadBalancer typed Service inside the Namespace
4. Create server Pod for the LoadBalancer typed Service
5. Create client Pod in the same Namespace
6. Verified the traffic from the client Pod to the LoadBalancer's external IP
7. Delete LoadBalancer typed Service and verified that the realted NSX resources
are removed as expected
8. Delete the Namespace from vCenter or K8s
9. Delete the VPC from NSX
@wenyingd
Copy link
Contributor Author

/e2e

1 similar comment
@wenyingd
Copy link
Contributor Author

/e2e

@wenyingd wenyingd requested a review from wenqiq December 17, 2024 08:05
Copy link
Contributor

@wenqiq wenqiq left a comment

Choose a reason for hiding this comment

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

LGTM overall. Just a nit comment.

test/e2e/framework.go Show resolved Hide resolved
test/e2e/vclient.go Show resolved Hide resolved
@wenyingd wenyingd merged commit a1693cd into vmware-tanzu:main Dec 17, 2024
2 checks passed
@wenyingd wenyingd deleted the e2e_pre_vpc branch December 17, 2024 09:42
wenyingd added a commit to wenyingd/nsx-operator that referenced this pull request Dec 17, 2024
This change is to add a new end-to-end test for the pre-created VPC, it includes
these steps,
1. Create a VPC/LBS/Attachment on NSX
2. Create a Namespace on vCenter or K8s, which depends on if the setup is a wcp
testbed or not. Note, it planned to run the test on wcp testbed, please provide
a valid pair of vc-user and vc-password which has the permission to create
instance on vCenter
3. Create LoadBalancer typed Service inside the Namespace
4. Create server Pod for the LoadBalancer typed Service
5. Create client Pod in the same Namespace
6. Verified the traffic from the client Pod to the LoadBalancer's external IP
7. Delete LoadBalancer typed Service and verified that the realted NSX resources
are removed as expected
8. Delete the Namespace from vCenter or K8s
9. Delete the VPC from NSX
wenyingd added a commit that referenced this pull request Dec 18, 2024
This change is to add a new end-to-end test for the pre-created VPC, it includes
these steps,
1. Create a VPC/LBS/Attachment on NSX
2. Create a Namespace on vCenter or K8s, which depends on if the setup is a wcp
testbed or not. Note, it planned to run the test on wcp testbed, please provide
a valid pair of vc-user and vc-password which has the permission to create
instance on vCenter
3. Create LoadBalancer typed Service inside the Namespace
4. Create server Pod for the LoadBalancer typed Service
5. Create client Pod in the same Namespace
6. Verified the traffic from the client Pod to the LoadBalancer's external IP
7. Delete LoadBalancer typed Service and verified that the realted NSX resources
are removed as expected
8. Delete the Namespace from vCenter or K8s
9. Delete the VPC from NSX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants