-
Notifications
You must be signed in to change notification settings - Fork 772
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
Kompose will read input from stdin #871
Conversation
Please add WIP and begin work on adding tests 👍 |
@cdrage I tried writing functional test but it's not working ? |
@cdrage , unit tests and command line test didn't work :( so I have added integration test (test-k8s). |
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.
I believe we should add cmd tests rather than integration tests. I'll see what I can do to help / investigate this, this week.
script/test_k8s/kubernetes.sh
Outdated
@@ -104,6 +104,13 @@ test_k8s() { | |||
echo -e "\n${RED}kompose down -f $f ${NC}\n" | |||
./kompose down -f $f | |||
done | |||
|
|||
echo -e "\nTesting stdin to kompose\n" |
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.
We shouldn't be adding these tests to integration tests... But more within CMD line tests.
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.
Argh. I saw what we did within #868 , see my comment there too. I'm fine with these tests (for now) but it's a bit of a hack / needs to refactor. But let's put that on our future agenda.
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.
@cdrage sure, I tried adding CMD line tests for stdin but got no success, so, I added here
f5c8ff8
to
02da34b
Compare
f957b21
to
36abaea
Compare
@cdrage all green :) |
Resolves issue kubernetes#870 for example, ``` $ cat docker-compose.yaml | kompose convert -f - INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created INFO Kubernetes file "frontend-deployment.yaml" created INFO Kubernetes file "redis-master-deployment.yaml" created INFO Kubernetes file "redis-slave-deployment.yaml" created ``` Added integration test for the same. `
cc @cdrage |
@hangyan I would of liked to have reviewed this before merging.. I'm against adding "short mode" to the testing suite. If you look at the code too there's this problem: https://github.com/kubernetes/kompose/pull/871/files#diff-aab6ee46f79d5d6c0c930f2773b8be29R17 where the test actually isn't being tested.. |
@cdrage Sorry, I have seen you approve this, and I have reviewed this too...Didn't seen that.. My bad. |
Resolves issue #870
for example,