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

NO-ISSUE: Verify that GORM embedded structure is always part of containing structure #4730

Merged
merged 1 commit into from Dec 6, 2022

Conversation

ori-amizur
Copy link
Contributor

There are locations that our code assumes that embedded structure is always not nil. This change adds tests to verify it.
For more information: go-gorm/gorm#5431

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

/cc @filanov

…ining structure

There are locations that our code assumes that embedded structure is
always not nil.  This change adds tests to verify it.
For more information: go-gorm/gorm#5431
@openshift-ci openshift-ci bot requested a review from filanov December 6, 2022 09:49
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 6, 2022
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #4730 (5161d05) into master (25576fc) will increase coverage by 0.23%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4730      +/-   ##
==========================================
+ Coverage   67.19%   67.42%   +0.23%     
==========================================
  Files         200      200              
  Lines       29705    29748      +43     
==========================================
+ Hits        19959    20058      +99     
+ Misses       7964     7900      -64     
- Partials     1782     1790       +8     
Impacted Files Coverage Δ
internal/cluster/common.go 76.60% <0.00%> (-1.48%) ⬇️
internal/network/utils.go 37.33% <0.00%> (-0.68%) ⬇️
internal/cluster/transition.go 72.00% <0.00%> (-0.39%) ⬇️
internal/bminventory/inventory.go 69.58% <0.00%> (-0.06%) ⬇️
...oller/controllers/clusterdeployments_controller.go 74.29% <0.00%> (-0.06%) ⬇️
...nal/controller/controllers/bmh_agent_controller.go 69.68% <0.00%> (+1.94%) ⬆️
internal/common/db.go 8.37% <0.00%> (+8.37%) ⬆️
internal/common/common_unitest_db.go 18.14% <0.00%> (+18.14%) ⬆️

@filanov
Copy link
Contributor

filanov commented Dec 6, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2022
@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: filanov, ori-amizur

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-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e6b4ec0 and 2 for PR HEAD 5161d05 in total

@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2022

@ori-amizur: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 75e3dbe into openshift:master Dec 6, 2022
danielerez pushed a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
…ining structure (openshift#4730)

There are locations that our code assumes that embedded structure is
always not nil.  This change adds tests to verify it.
For more information: go-gorm/gorm#5431
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants