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

test: fix unit tests and add build stats #26

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# vm-dhcp-controller

[![Build Status](https://drone-publish.rancher.io/api/badges/harvester/vm-dhcp-controller/status.svg)](https://drone-publish.rancher.io/harvester/vm-dhcp-controller)
[![Releases](https://img.shields.io/github/release/harvester/vm-dhcp-controller.svg)](https://github.com/harvester/vm-dhcp-controller/releases)

A managed DHCP service for virtual machines running on Harvester, ported from [joeyloman/kubevirt-ip-helper](https://github.com/joeyloman/kubevirt-ip-helper) and its subsidiary projects.

## Features
Expand Down Expand Up @@ -38,7 +41,7 @@ How the controller and agents collaborate to provide DHCP services for virtual m

## Develop

To generate the controllers/clientsets:
To generate the crds/controllers/clientsets:

```
go generate
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/ippool/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func TestHandler_DeployAgent(t *testing.T) {
Label(clusterNetworkLabelKey, testClusterNetwork).Build()
givenPod, _ := prepareAgentPod(
NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName).
ServerIP(testServerIP).
ServerIP(testServerIP1).
CIDR(testCIDR).
NetworkName(testNetworkName).Build(),
false,
Expand Down Expand Up @@ -561,15 +561,15 @@ func TestHandler_DeployAgent(t *testing.T) {
t.Run("agent pod upgrade held back", func(t *testing.T) {
givenIPPool := newTestIPPoolBuilder().
Annotation(holdIPPoolAgentUpgradeAnnotationKey, "true").
ServerIP(testServerIP).
ServerIP(testServerIP1).
CIDR(testCIDR).
NetworkName(testNetworkName).
AgentPodRef(testPodNamespace, testPodName, testImage, "").Build()
givenNAD := newTestNetworkAttachmentDefinitionBuilder().
Label(clusterNetworkLabelKey, testClusterNetwork).Build()
givenPod, _ := prepareAgentPod(
NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName).
ServerIP(testServerIP).
ServerIP(testServerIP1).
CIDR(testCIDR).
NetworkName(testNetworkName).Build(),
false,
Expand Down
Loading