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

test: fix prior k8s minor version in mocks and upgrade test #4359

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

mboersma
Copy link
Member

@mboersma mboersma commented Apr 7, 2021

Reason for Change:

Some unit test code was naively calculating the prior Kubernetes version by decrementing the minor but leaving the major and patch versions intact. This will fail when Kubernetes 1.18.18 comes out next week, since it will supply "1.17.18" which doesn't and won't exist.

Instead let's reuse the RationalizeReleaseAndVersion func to get the latest patch for the previous minor release correctly.

Issue Fixed:

Prevents a test bug that will arise next Wednesday when v1.18.18 drops.

Credit Where Due:

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

  • No
  • Yes

Requirements:

Notes:

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #4359 (fc9aa0e) into master (4e47f3d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4359   +/-   ##
=======================================
  Coverage   72.08%   72.08%           
=======================================
  Files         141      141           
  Lines       21662    21662           
=======================================
  Hits        15616    15616           
  Misses       5094     5094           
  Partials      952      952           
Impacted Files Coverage Δ
pkg/armhelpers/mockclients.go 25.05% <100.00%> (ø)

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 4e47f3d...fc9aa0e. Read the comment docs.

Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

@acs-bot
Copy link

acs-bot commented Apr 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, mboersma

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:
  • OWNERS [jackfrancis,mboersma]

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

@jackfrancis jackfrancis merged commit 3d40c82 into Azure:master Apr 8, 2021
@mboersma mboersma deleted the fix-previous-minor-mock-version branch April 8, 2021 20:08
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.

3 participants