-
Notifications
You must be signed in to change notification settings - Fork 44
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
Thingpeida integration test using k8s #1041
Conversation
a94d066
to
e850d5f
Compare
e850d5f
to
a2a7da0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! This looks very nice, I'm looking forward to automatic testing of our k8s stuff before we deploy to staging. I have left a couple comments but overall I like this a lot.
@@ -0,0 +1,21 @@ | |||
DATABASE_URL: "mysql://root:password@mariadb.default.svc.cluster.local/thingengine_test?charset=utf8mb4_bin" | |||
DATABASE_PROXY_URL: "http://dbproxy.default.svc.cluster.local:8200" | |||
SERVER_ORIGIN: "http://localhost:8080" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? The tests read SERVER_ORIGIN to know where to connect to, so shouldn't it be an in-cluster URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The localhost:8080 is port mapped to the frontend node port for the selenium tests. Not sure how to get firefox to run inside REHL 8 UBI. The other tests are ran locally inside the frontend pod so localhost:8080 also works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No running firefox from outside makes sense, let Travis deal with configuring it...
THINGENGINE_CONFIGDIR=tests/thingpedia-integration/k8s npx nyc ts-node tests/test_website_selenium.js | ||
|
||
# Copy coverage outputs from frontend pod | ||
kubectl cp $POD:/opt/almond-cloud/.nyc_output .nyc_output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is /opt/almond-cloud writable from inside the test docker? Do we get any coverage at all from this process?
And what about Go coverage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is in the frontend pod since I enabled root. I think these coverage outputs are from the thingpedia integration tests.
Go coverage is only enabled in the GO unittests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah coverage of the test code itself is not very interesting. It would be nice to enable coverage of the actual frontend process. Not sure how we do that, and how we kill the frontend and capture it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got the coverage outputs of frontend and worker. Now the coverage report looks reasonable.
a77d026
to
5051459
Compare
Pull Request Test Coverage Report for Build 3515
💛 - Coveralls |
cae5496
to
6df9beb
Compare
tests/website/test_my_api.js
Outdated
@@ -359,7 +359,7 @@ async function testMyApiConverse(auth) { | |||
}, { | |||
id: 4, | |||
type: 'text', | |||
text: 'Sorry, I did not understand that. Can you rephrase it?', | |||
text: 'Sorry, there seems to be a problem with the Genie service at the moment. Please try again later.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on from making this change. The NLP service is having some issue (stanford-oval/genienlp#174) and is not staying up, but this is not the right reply.
6df9beb
to
5a5ce18
Compare
5a5ce18
to
8b68d46
Compare
This PR sets up a k8s cluster on Travis using kind .
Most of the tests are ran inside the frontend pod.