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

Added unit tests for the prometheus trait #255 #1142

Merged
merged 1 commit into from Dec 16, 2019

Conversation

aldettinger
Copy link
Contributor

No description provided.

assert.Equal(t, corev1.ConditionFalse, condition.Status)
}

func TestApplyPrometheusTraitWithServiceDoesNotSucceed(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 more eyes are welcome there. when applying the trait with an existing service, the status outcome is IntegrationConditionServiceNotAvailableReason. Correct ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about that.. maybe @jamesnetherton can shed some light..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IntegrationConditionServiceNotAvailableReason reason should only be set on the condition when the service trait is disabled. Otherwise, this is a bug. Note that the current logic of the Prometheus trait may not be very robust as it makes the implicit assumption that only the service trait can create a service beforehand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small issue then, I've opened #1149 to keep track. I'll rebase, thanks for review 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants