Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

catalog: simplify function isValidTrafficTarget() #2246

Merged

Conversation

draychev
Copy link
Contributor

@draychev draychev commented Jan 5, 2021

This PR simplifies isValidTrafficTarget()

Added a test to cover non-nil but empty Rules.


Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

@draychev draychev requested a review from a team as a code owner January 5, 2021 00:34
@draychev draychev force-pushed the simplify-isValidTrafficTarget branch from 863da5a to 2567a3a Compare January 5, 2021 00:35
@codecov-io
Copy link

codecov-io commented Jan 5, 2021

Codecov Report

Merging #2246 (911f36f) into main (c48acb9) will increase coverage by 0.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2246      +/-   ##
==========================================
+ Coverage   58.17%   58.39%   +0.22%     
==========================================
  Files         146      146              
  Lines        6388     6386       -2     
==========================================
+ Hits         3716     3729      +13     
+ Misses       2667     2652      -15     
  Partials        5        5              
Impacted Files Coverage Δ
pkg/catalog/routes.go 79.03% <100.00%> (-0.15%) ⬇️
pkg/envoy/route/config.go 96.03% <0.00%> (+0.79%) ⬆️
pkg/configurator/validating_webhook.go 78.98% <0.00%> (+10.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c48acb9...911f36f. Read the comment docs.

@draychev draychev force-pushed the simplify-isValidTrafficTarget branch 2 times, most recently from 7e15a95 to 911f36f Compare January 5, 2021 23:26
Signed-off-by: Delyan Raychev <delyan.raychev@microsoft.com>
@draychev draychev force-pushed the simplify-isValidTrafficTarget branch from 911f36f to db53e7c Compare January 6, 2021 01:58
pkg/catalog/routes.go Show resolved Hide resolved
@draychev draychev merged commit d640c42 into openservicemesh:main Jan 6, 2021
@draychev draychev deleted the simplify-isValidTrafficTarget branch January 6, 2021 18:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants