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

adapt linodecluster controller tests to new mocktest changes #277

Merged
merged 43 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
70f3189
define mocktest pkg
bcm820 Apr 8, 2024
d95e373
directive to force path
bcm820 Apr 8, 2024
d18db18
add asserts node
bcm820 Apr 8, 2024
3b28cfa
prefer testmock
bcm820 Apr 8, 2024
93daad7
allow appending new paths
bcm820 Apr 8, 2024
380e2de
support multiple clients
bcm820 Apr 8, 2024
296563e
preserve ordering
bcm820 Apr 8, 2024
f7a1495
use generics for running tests
bcm820 Apr 8, 2024
e76ab9e
add once nodes
bcm820 Apr 12, 2024
7326f0e
invoke reconcile indirectly
bcm820 Apr 13, 2024
9304f43
add controller test util
bcm820 Apr 15, 2024
1786645
replace interfaces with explicit types
bcm820 Apr 15, 2024
71c1830
test with non-controllers
bcm820 Apr 15, 2024
43a6b43
Merge branch 'main' into mocktest
bcm820 Apr 15, 2024
78e5093
update tests
bcm820 Apr 15, 2024
2cb7633
address lints
bcm820 Apr 16, 2024
b8a2798
reduce complexity
bcm820 Apr 18, 2024
3f1d4b1
goimports
bcm820 Apr 18, 2024
4a911e9
refactor internals
bcm820 Apr 18, 2024
10fb8d7
support event nodes
bcm820 Apr 19, 2024
f8402b2
abstract channel from events
bcm820 Apr 20, 2024
877f768
enhance with docs
bcm820 Apr 22, 2024
b6bae36
exclude goimports in controller tests
bcm820 Apr 23, 2024
f742e57
nilcheck
bcm820 Apr 23, 2024
2a8fd12
fix test
bcm820 Apr 23, 2024
ea505af
include mocktest in coverage
bcm820 Apr 23, 2024
3341a63
test suite
bcm820 Apr 24, 2024
3b5efbc
events and logs from mock obj
bcm820 Apr 24, 2024
e3908ab
full coverage
bcm820 Apr 24, 2024
48a0f9f
more tests
bcm820 Apr 24, 2024
9ce1d98
require Path in OneOf
bcm820 Apr 25, 2024
56ac277
Merge branch 'main' into mocktest
bcm820 Apr 26, 2024
d68c0c9
adapt linodecluster controller tests to new mocktest changes
amold1 Apr 23, 2024
e03ed77
Test for setting up clusterScope
amold1 Apr 23, 2024
dc96d3b
Revert "Test for setting up clusterScope"
amold1 Apr 23, 2024
e8cf68c
add test for nil nb
amold1 Apr 24, 2024
21033e0
add test for nil nb config
amold1 Apr 24, 2024
35d936c
Revert "add test for nil nb config"
amold1 Apr 24, 2024
dd99f3b
add test for nil nb config
amold1 Apr 24, 2024
3c76933
s/Path/OneOf and some other related changes
amold1 Apr 26, 2024
1779352
fix codeql errors
amold1 Apr 26, 2024
15bad63
fix codeql errors
amold1 Apr 26, 2024
1dc5f24
Merge branch 'main' into mocktest.adeodhar
amold1 Apr 26, 2024
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
4 changes: 2 additions & 2 deletions cloud/scope/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara
}

return &ClusterScope{
client: params.Client,
Client: params.Client,
Cluster: params.Cluster,
LinodeClient: linodeClient,
LinodeCluster: params.LinodeCluster,
Expand All @@ -82,7 +82,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara

// ClusterScope defines the basic context for an actuator to operate upon.
type ClusterScope struct {
client K8sClient
Client K8sClient
PatchHelper *patch.Helper
LinodeClient LinodeNodeBalancerClient
Cluster *clusterv1.Cluster
Expand Down
1 change: 1 addition & 0 deletions controller/linodecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (r *LinodeClusterReconciler) reconcileDelete(ctx context.Context, logger lo
if clusterScope.LinodeCluster.Spec.Network.NodeBalancerID == nil {
logger.Info("NodeBalancer ID is missing, nothing to do")
controllerutil.RemoveFinalizer(clusterScope.LinodeCluster, infrav1alpha1.GroupVersion.String())
r.Recorder.Event(clusterScope.LinodeCluster, corev1.EventTypeWarning, "NodeBalancerIDMissing", "NodeBalancer ID is missing, nothing to do")

return nil
}
Expand Down
Loading
Loading