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

Invoking kompose --bundle X.dab convert --stdout will produce two differently ordered results #231

Closed
cab105 opened this issue Oct 22, 2016 · 6 comments
Assignees

Comments

@cab105
Copy link
Contributor

cab105 commented Oct 22, 2016

The current kompose testing framework relies on dumping the results of the command to stdout and comparing it against a known baseline. While doing the same thing for converting bundles, kompose will alter the order of the output such that no two invocations will result in the same output (see test1.txt and test2.txt).

While this doesn't pose an issue for normal operations, this will result in the tests failing occasionally. The primary question is whether the tests should be altered to compare the resulting file output, or of dumping via stdout should be consistent?

test1.txt
test2.txt

@surajssd
Copy link
Member

@cab105 see if this helps https://github.com/kubernetes-incubator/kompose/blob/master/script/test/cmd/lib.sh#L70

It can match json even if the order changes. Also you can use functions like convert::match_output directly.

@surajssd
Copy link
Member

@cab105
Copy link
Contributor Author

cab105 commented Oct 25, 2016

Thanks for the guideline, but the thing is that I'm running this through
convert::expect_success and convert::expect_success_and_warning so
convert::match_output is being called.

Then again, I need to debug if this is my environment or a bug with the
test scripts.

On 10/22/2016 09:57 PM, Suraj Deshmukh wrote:

@cab105 https://github.com/cab105 see the usage here
https://github.com/kubernetes-incubator/kompose/blob/master/script/test/cmd/tests.sh#L15


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#231 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmHpnplRf9GO4P59sYKcMhpOBHMtHusks5q2ulAgaJpZM4Kd8dl.

@sebgoa
Copy link
Contributor

sebgoa commented Nov 29, 2016

@cab105 can we close this ?

@cab105
Copy link
Contributor Author

cab105 commented Nov 29, 2016

I'd say not yet. Haven't had a chance to delve into it, but will take ownership.

@cab105 cab105 self-assigned this Nov 29, 2016
cab105 pushed a commit to cab105/kompose that referenced this issue Dec 14, 2016
cab105 added a commit to cab105/kompose that referenced this issue Dec 15, 2016
cab105 added a commit that referenced this issue Dec 18, 2016
@cdrage
Copy link
Member

cdrage commented Dec 22, 2016

#338 has been merged. This is safe to be closed.

@cab105 cab105 closed this as completed Dec 22, 2016
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

No branches or pull requests

4 participants