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

test(osm-bootstrap): add unit tests for mesh config #4181

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

michelleN
Copy link
Contributor

  • adds unit tests for mesh config logic

Signed-off-by: Michelle Noorali [email protected]

Description:

Testing done:

Affected area:

Functional Area
New Functionality [ ]
CI System [ ]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [ ]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [ ]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project?

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change?

@michelleN michelleN requested a review from a team as a code owner September 28, 2021 15:56
"envoyImage": "envoyproxy/envoy-alpine@sha256:6502a637c6c5fba4d03d0672d878d12da4bcc7a0d0fb3f1d506982dde0039abd",
"initContainerImage": "openservicemesh/init:latest-main",
"configResyncInterval": "2s"
"enablePrivilegedInitContainer": false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

didn't impact tests but I added back the indentation for readability. thanks for noticing.

@codecov-commenter
Copy link

Codecov Report

Merging #4181 (769200c) into main (f262ef5) will increase coverage by 0.07%.
The diff coverage is 65.51%.

❗ Current head 769200c differs from pull request most recent head db7181d. Consider uploading reports for the commit db7181d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4181      +/-   ##
==========================================
+ Coverage   69.91%   69.99%   +0.07%     
==========================================
  Files         212      212              
  Lines       11615    11630      +15     
==========================================
+ Hits         8121     8140      +19     
+ Misses       3441     3437       -4     
  Partials       53       53              
Flag Coverage Δ
unittests 69.99% <65.51%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/osm-bootstrap/osm-bootstrap.go 42.10% <65.51%> (+9.90%) ⬆️
pkg/certificate/rotor/rotor.go 87.50% <0.00%> (+3.12%) ⬆️

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 f262ef5...db7181d. Read the comment docs.

}

if apierrors.IsAlreadyExists(err) {
return nil
Copy link
Contributor

@snehachhabria snehachhabria Sep 28, 2021

Choose a reason for hiding this comment

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

it would be nice if we could keep the logs that were present previously

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just bubbled up the error to main() where there is one log line which wraps the error https://github.com/openservicemesh/osm/pull/4181/files#diff-2aa329ee12aeb0b3d3a60599559a0bbe07422779d9f730f4be4e668b275e06acR146

I thought a log line here might be confusing but I can add it in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added.

+ adds unit tests for mesh config logic

Signed-off-by: Michelle Noorali <[email protected]>
@michelleN michelleN merged commit 8b8448a into openservicemesh:main Sep 28, 2021
@michelleN michelleN deleted the bootstrap branch September 28, 2021 21:38
snehachhabria pushed a commit to snehachhabria/osm that referenced this pull request Oct 14, 2021
…4181)

+ adds unit tests for mesh config logic

Signed-off-by: Michelle Noorali <[email protected]>
Signed-off-by: Sneha Chhabria <[email protected]>
allenlsy pushed a commit to allenlsy/osm that referenced this pull request Dec 28, 2021
…4181)

+ adds unit tests for mesh config logic

Signed-off-by: Michelle Noorali <[email protected]>
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