Skip to content

Commit 23be228

Browse files
Fix unparam lint issue at test/upgrade-e2e/post_upgrade_test.go:225:69
Issue: test/upgrade-e2e/post_upgrade_test.go:225:69 unparam - always receives
1 parent 124460c commit 23be228

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/upgrade-e2e/post_upgrade_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525

2626
const (
2727
artifactName = "operator-controller-upgrade-e2e"
28+
container = "manager"
2829
)
2930

3031
func TestClusterCatalogUnpacking(t *testing.T) {
@@ -59,7 +60,7 @@ func TestClusterCatalogUnpacking(t *testing.T) {
5960
leaderCtx, leaderCancel := context.WithTimeout(ctx, 3*time.Minute)
6061
defer leaderCancel()
6162
leaderSubstrings := []string{"successfully acquired lease"}
62-
leaderElected, err := watchPodLogsForSubstring(leaderCtx, &managerPod, "manager", leaderSubstrings...)
63+
leaderElected, err := watchPodLogsForSubstring(leaderCtx, &managerPod, leaderSubstrings...)
6364
require.NoError(t, err)
6465
require.True(t, leaderElected)
6566

@@ -70,7 +71,7 @@ func TestClusterCatalogUnpacking(t *testing.T) {
7071
"reconcile ending",
7172
fmt.Sprintf(`ClusterCatalog=%q`, testClusterCatalogName),
7273
}
73-
found, err := watchPodLogsForSubstring(logCtx, &managerPod, "manager", substrings...)
74+
found, err := watchPodLogsForSubstring(logCtx, &managerPod, substrings...)
7475
require.NoError(t, err)
7576
require.True(t, found)
7677

@@ -116,7 +117,7 @@ func TestClusterExtensionAfterOLMUpgrade(t *testing.T) {
116117
defer leaderCancel()
117118

118119
leaderSubstrings := []string{"successfully acquired lease"}
119-
leaderElected, err := watchPodLogsForSubstring(leaderCtx, managerPod, "manager", leaderSubstrings...)
120+
leaderElected, err := watchPodLogsForSubstring(leaderCtx, managerPod, leaderSubstrings...)
120121
require.NoError(t, err)
121122
require.True(t, leaderElected)
122123

@@ -128,7 +129,7 @@ func TestClusterExtensionAfterOLMUpgrade(t *testing.T) {
128129
"reconcile ending",
129130
fmt.Sprintf(`ClusterExtension=%q`, testClusterExtensionName),
130131
}
131-
found, err := watchPodLogsForSubstring(logCtx, managerPod, "manager", substrings...)
132+
found, err := watchPodLogsForSubstring(logCtx, managerPod, substrings...)
132133
require.NoError(t, err)
133134
require.True(t, found)
134135

@@ -222,7 +223,7 @@ func waitForDeployment(t *testing.T, ctx context.Context, controlPlaneLabel stri
222223
return &managerPods.Items[0]
223224
}
224225

225-
func watchPodLogsForSubstring(ctx context.Context, pod *corev1.Pod, container string, substrings ...string) (bool, error) {
226+
func watchPodLogsForSubstring(ctx context.Context, pod *corev1.Pod, substrings ...string) (bool, error) {
226227
podLogOpts := corev1.PodLogOptions{
227228
Follow: true,
228229
Container: container,

0 commit comments

Comments
 (0)