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

test: added unit test for validateNetworkConfig #537

Merged
merged 7 commits into from
Apr 17, 2023

Conversation

smritidahal653
Copy link
Collaborator

@smritidahal653 smritidahal653 commented Apr 15, 2023

added unit test coverage for validateNetworkConfig in aci_network.go

Test case break down:

Vnet name

  • Provider Vnet name is set but environment variable is not: tc2
  • Provider Vnet name is not set but environment variable is: tc3
  • Both provider Vnet name and environment variable is set: tc6
  • Neither provider Vnet name nor environment variable is set: tc1

Vnet resource group

  • Provider Vnet resource group is set but environment variable is not: tc2
  • Provider Vnet resource group is not set but environment variable is: tc4
  • Both provider Vnet resource group and environment variable is set: tc6
  • Neither provider Vnet resource group nor environment variable is set: tc3

Subnet name

  • Provider Subnet name is set but environment variable is not: tc2
  • Provider Subnet name is not set but environment variable is
    -- malformed: tc7
    --valid: tc8
  • Both provider Subnet name and environment variable is set: tc6
  • Neither provider Subnet name nor environment variable is set: tc5

@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:18 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:18 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Merging #537 (0af5450) into master (4f3dc80) will increase coverage by 1.40%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
+ Coverage   66.04%   67.45%   +1.40%     
==========================================
  Files          15       15              
  Lines        2486     2486              
==========================================
+ Hits         1642     1677      +35     
+ Misses        728      693      -35     
  Partials      116      116              

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:35 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:35 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:43 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 15, 2023 00:43 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 17, 2023 19:59 — with GitHub Actions Inactive
@smritidahal653 smritidahal653 temporarily deployed to test April 17, 2023 19:59 — with GitHub Actions Inactive
Copy link
Member

@helayoty helayoty left a comment

Choose a reason for hiding this comment

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

Thanks for redesigning the test case. It hits all the corner cases now. LGTM 🚀

@helayoty helayoty enabled auto-merge (squash) April 17, 2023 20:27
@helayoty helayoty merged commit c6fd9af into virtual-kubelet:master Apr 17, 2023
@smritidahal653 smritidahal653 deleted the unitTestCoverage branch August 23, 2023 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants