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

Update tests to work on OpenShift #323

Merged
merged 2 commits into from
Mar 18, 2019
Merged

Update tests to work on OpenShift #323

merged 2 commits into from
Mar 18, 2019

Conversation

kevinearls
Copy link
Contributor

This is the second set of changes for #227. I've done the following

  • Changed several tests to use portForwarding rather than ingress as suggested by @pavolloffay . This simplifies making them work both on Kubernetes and OpenShift
  • Created a version of the daemonsettest called daemonset_with_ingress to cover ingress testing. This currently does not work on OpenShift as we call WaitForIngress to make sure deplyment has finished, but on OpenShift a route gets created instead. We need to either figure out how to find routes with kubeclient or start using a openshift client for this test.
  • I've refactored a couple of things (specifically creating getVertxDeployment and getJaegerDefinition functions in daemonset test to try to reduce repetition and make test cases shorter. I'll try to do more of this in the future.

@jpkrohling
Copy link
Contributor

This change is Reviewable

@kevinearls
Copy link
Contributor Author

@pavolloffay @objectiser @jpkrohling Please review

@codecov
Copy link

codecov bot commented Mar 15, 2019

Codecov Report

Merging #323 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #323   +/-   ##
=======================================
  Coverage   88.94%   88.94%           
=======================================
  Files          69       69           
  Lines        3112     3112           
=======================================
  Hits         2768     2768           
  Misses        234      234           
  Partials      110      110

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fcc9dd...3e88d16. Read the comment docs.

req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return err
func getJaegerDefinition(namespace string, name string) *v1.Jaeger {
Copy link
Contributor

Choose a reason for hiding this comment

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

Think this needs to be renamed to indicate it is returning a AgentAsDaemonSet definition.

@@ -0,0 +1,111 @@
package e2e
Copy link
Contributor

Choose a reason for hiding this comment

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

Testing the ingress should be independent of the agent, whether deployed daemonset or sidecar. Might be better to have variants of the all-in-one-test.go and production-test.go that use ingress instead of port-forward?

defer portForward.Close()
defer close(closeChan)


Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove extra line

})
}


Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove two extra lines

@pavolloffay
Copy link
Member

We need to either figure out how to find routes with kubeclient or start using a openshift client for this test.

Routes can be queried with the same API as other objects

if err := r.client.List(context.Background(), opts, list); err != nil {

You can use this PR to see how we know that we are running on OCP or k8s #217

@kevinearls
Copy link
Contributor Author

HI @objectiser I've updated this based on your previous comments. Could you please take another look?

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

LGTM - although did you checkout the link provided by Pavol regarding routes? This could be handled in a separate PR I guess, if you wanted to get this one merged.

@kevinearls
Copy link
Contributor Author

@objectiser I'm looking at that now. If possible though I'd like to get this merged and add that as a separate issue.

@objectiser
Copy link
Contributor

@kevinearls that is fine with me.

@kevinearls
Copy link
Contributor Author

@objectiser Thanks. Can you merge it then, or do I need review from @pavolloffay and @jpkrohling too?

@objectiser objectiser merged commit 1ba8946 into jaegertracing:master Mar 18, 2019
@kevinearls kevinearls deleted the issue227 branch March 18, 2019 14:22
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.

4 participants