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

Deprecation utests #1164

Merged

Conversation

grokspawn
Copy link
Contributor

@grokspawn grokspawn commented Nov 13, 2023

Follows #1161. Contributes to #1154. Closes #1163

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2023
Copy link
Contributor

openshift-ci bot commented Nov 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grokspawn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f7c6429) 53.32% compared to head (dbb1627) 53.67%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1164      +/-   ##
==========================================
+ Coverage   53.32%   53.67%   +0.35%     
==========================================
  Files         108      108              
  Lines       10337    10340       +3     
==========================================
+ Hits         5512     5550      +38     
+ Misses       3841     3808      -33     
+ Partials      984      982       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grokspawn grokspawn force-pushed the deprecation_utest branch 3 times, most recently from 8960594 to ccc7bac Compare November 14, 2023 03:15
@@ -291,7 +440,7 @@ func TestConvertToModel(t *testing.T) {
}

func TestConvertToModelRoundtrip(t *testing.T) {
expected := buildValidDeclarativeConfig(true)
expected := buildValidDeclarativeConfig(validDeclarativeConfigSpec{IncludeUnrecognized: true, IncludeDeprecations: false}) // TODO: turn on deprecation when we have model-->declcfg conversion
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function goes declcfg --> model --> declcfg and compares the start and finish products. We don't yet have backwards conversion, so this can't be enabled until #1162 lands.

@@ -19,7 +19,7 @@ func TestConvertFromModel(t *testing.T) {
{
name: "Success",
m: buildTestModel(),
expectCfg: buildValidDeclarativeConfig(false),
expectCfg: buildValidDeclarativeConfig(validDeclarativeConfigSpec{IncludeUnrecognized: false, IncludeDeprecations: false}),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#1162 will make this false, true

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
@grokspawn grokspawn changed the title WIP: Deprecation utests Deprecation utests Nov 14, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2023
alpha/declcfg/declcfg_to_model_test.go Show resolved Hide resolved
alpha/declcfg/declcfg_to_model_test.go Show resolved Hide resolved
pkg/server/server_test.go Outdated Show resolved Hide resolved
pkg/server/server_test.go Outdated Show resolved Hide resolved
pkg/server/server_test.go Outdated Show resolved Hide resolved
pkg/server/server_test.go Outdated Show resolved Hide resolved
pkg/server/server_test.go Outdated Show resolved Hide resolved
@grokspawn grokspawn mentioned this pull request Nov 14, 2023
3 tasks
@awgreene
Copy link
Member

I'll happily give this an lgtm once @grokspawn has time to response to @stevekuznetsov's review.

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
@stevekuznetsov
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 39df3b7 into operator-framework:master Nov 16, 2023
13 checks passed
@grokspawn grokspawn deleted the deprecation_utest branch November 16, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GRPC deprecation utests
3 participants