Skip to content

Add telemetry collection of deployment replica count #1551

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

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix lint issues
  • Loading branch information
bjee19 committed Feb 13, 2024
commit 2b073655cece49ca82528cecf6a5608d08b7c3a0
14 changes: 7 additions & 7 deletions internal/mode/static/telemetry/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func createGetCallsFunc() func(
object client.Object,
option ...client.GetOption,
) error {
return func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
return func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand Down Expand Up @@ -414,7 +414,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the kubernetes client errored when getting the Pod", func() {
expectedErr := errors.New("there was an error getting the Pod")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand All @@ -433,7 +433,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the Pod's owner reference is nil", func() {
expectedErr := errors.New("expected one owner reference of the NGF Pod, got 0")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand All @@ -455,7 +455,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the Pod has multiple owner references", func() {
expectedErr := errors.New("expected one owner reference of the NGF Pod, got 2")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand Down Expand Up @@ -486,7 +486,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the Pod's owner reference is not a ReplicaSet", func() {
expectedErr := errors.New("expected pod owner reference to be ReplicaSet, got Deployment")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand All @@ -513,7 +513,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the replica set's replicas is nil", func() {
expectedErr := errors.New("replica set replicas was nil")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand Down Expand Up @@ -544,7 +544,7 @@ var _ = Describe("Collector", Ordered, func() {
It("should error if the kubernetes client errored when getting the ReplicaSet", func() {
expectedErr := errors.New("there was an error getting the ReplicaSet")
k8sClientReader.GetCalls(
func(ctx context.Context, key client.ObjectKey, object client.Object, option ...client.GetOption) error {
func(_ context.Context, _ client.ObjectKey, object client.Object, option ...client.GetOption) error {
Expect(option).To(BeEmpty())

switch typedObj := object.(type) {
Expand Down