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

feat: Add test for meshsync #485

Merged
merged 1 commit into from
May 23, 2023
Merged

feat: Add test for meshsync #485

merged 1 commit into from
May 23, 2023

Conversation

Aisuko
Copy link
Member

@Aisuko Aisuko commented May 22, 2023

Description

This PR is related to #463

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.
@Aisuko ➜ /workspaces/meshery-operator (feat/meshsync) $ make coverage
make bin/setup-envtest
make[1]: Entering directory '/workspaces/meshery-operator'
go: downloading sigs.k8s.io/controller-runtime v0.13.1-0.20221212190805-d4f1e822ca11
go: downloading sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20221212190805-d4f1e822ca11
go: downloading github.com/go-logr/zapr v1.2.0
go: downloading github.com/go-logr/logr v1.2.0
go: downloading github.com/spf13/afero v1.6.0
go: downloading go.uber.org/zap v1.19.1
go: downloading golang.org/x/text v0.3.7
go: downloading go.uber.org/atomic v1.7.0
make[1]: Leaving directory '/workspaces/meshery-operator'
bin/setup-envtest use 1.24.2 --bin-dir /workspaces/meshery-operator/bin
Version: 1.24.2
OS/Arch: linux/amd64
md5: ZViX8vb02m8ULK0fkiNNGw==
Path: /workspaces/meshery-operator/bin/k8s/1.24.2-linux-amd64
go test -v ./... -coverprofile cover.out
?       github.com/layer5io/meshery-operator    [no test files]
=== RUN   TestAPIs
Running Suite: APIs Suite - /workspaces/meshery-operator/api/v1alpha1
=====================================================================
Random Seed: 1684734948

Will run 12 of 12 specs
••••••••••••

Ran 12 of 12 Specs in 0.005 seconds
SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestAPIs (0.01s)
PASS
        github.com/layer5io/meshery-operator/api/v1alpha1       coverage: 49.2% of statements
ok      github.com/layer5io/meshery-operator/api/v1alpha1       0.020s  coverage: 49.2% of statements
?       github.com/layer5io/meshery-operator/pkg/client [no test files]
?       github.com/layer5io/meshery-operator/pkg/client/v1alpha1        [no test files]
=== RUN   TestAPIs
Running Suite: Controller Suite - /workspaces/meshery-operator/controllers
==========================================================================
Random Seed: 1684734951

Will run 11 of 11 specs
Ran 11 of 11 Specs in 66.117 seconds
SUCCESS! -- 11 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestAPIs (66.12s)
PASS
        github.com/layer5io/meshery-operator/controllers        coverage: 48.8% of statements
ok      github.com/layer5io/meshery-operator/controllers        66.152s coverage: 48.8% of statements
=== RUN   TestAPIs
Running Suite: Broker Suite - /workspaces/meshery-operator/pkg/broker
=====================================================================
Random Seed: 1684734951

Will run 3 of 3 specs
•••

Ran 3 of 3 Specs in 5.486 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestAPIs (5.49s)
PASS
        github.com/layer5io/meshery-operator/pkg/broker coverage: 73.7% of statements
ok      github.com/layer5io/meshery-operator/pkg/broker 5.519s  coverage: 73.7% of statements
=== RUN   TestGetObjects
--- PASS: TestGetObjects (0.00s)
PASS
        github.com/layer5io/meshery-operator/pkg/meshsync       coverage: 100.0% of statements
ok      github.com/layer5io/meshery-operator/pkg/meshsync       0.007s  coverage: 100.0% of statements
go tool cover -html=cover.out -o cover.html

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -2.42 ⚠️

Comparison is base (30e76b9) 48.85% compared to head (e844035) 46.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
- Coverage   48.85%   46.44%   -2.42%     
==========================================
  Files           8        9       +1     
  Lines         438      450      +12     
==========================================
- Hits          214      209       -5     
- Misses        211      223      +12     
- Partials       13       18       +5     
Flag Coverage Δ
unittests 46.44% <ø> (-2.42%) ⬇️

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

Impacted Files Coverage Δ
pkg/meshsync/meshsync.go 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@Micost Micost left a comment

Choose a reason for hiding this comment

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

approved and ready to go

@Aisuko Aisuko requested a review from leecalcote May 22, 2023 06:17
@leecalcote leecalcote requested a review from Azanul May 22, 2023 14:27
Makefile Outdated Show resolved Hide resolved
Signed-off-by: Aisuko <urakiny@gmail.com>
@Aisuko Aisuko merged commit 9b5f3c4 into master May 23, 2023
5 of 6 checks passed
@Aisuko Aisuko deleted the feat/meshsync branch May 23, 2023 09:04
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.

None yet

3 participants