Skip to content

Commit

Permalink
test: fix unit tests and add build stats
Browse files Browse the repository at this point in the history
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
  • Loading branch information
starbops authored and bk201 committed Feb 26, 2024
1 parent 8a91b61 commit ecc9682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit ecc9682

Please sign in to comment.