Skip to content

Commit

Permalink
added builders.go
Browse files Browse the repository at this point in the history
  • Loading branch information
abdurrehman107 committed Dec 5, 2023
1 parent 6dfe692 commit 8a391e1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions internal/test/builder/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,9 @@ func (m *MachinePoolBuilder) Build() *expv1.MachinePool {
Namespace: m.namespace,
Labels: m.labels,
},
Status: expv1.MachinePoolStatus{
NodeRefs: m.status.NodeRefs,
},
Spec: expv1.MachinePoolSpec{
ClusterName: m.clusterName,
Replicas: m.replicas,
Expand All @@ -1576,14 +1579,15 @@ func (m *MachinePoolBuilder) Build() *expv1.MachinePool {

// NodeBuilder holds the variables required to build a Node.
type NodeBuilder struct {
name string
status corev1.NodeStatus
name string
status corev1.NodeStatus
}

// Node returns a NodeBuilder.
func Node(name string) *NodeBuilder {

Check failure on line 1587 in internal/test/builder/builders.go

View workflow job for this annotation

GitHub Actions / lint

unnecessary leading newline (whitespace)

return &NodeBuilder{
name: name,
name: name,
}
}

Expand All @@ -1601,7 +1605,7 @@ func (n *NodeBuilder) Build() *corev1.Node {
APIVersion: clusterv1.GroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: n.name,
Name: n.name,
},
}
return obj
Expand Down

0 comments on commit 8a391e1

Please sign in to comment.