-
Notifications
You must be signed in to change notification settings - Fork 770
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
Script for generating unit tests #805
Conversation
@cdrage Please see if this works. Will proceed based on your inputs. |
This works, but perhaps lets make it interactive? Run |
script/test/cmd/generate_unit.sh
Outdated
TEST_DIR='' | ||
|
||
# Location of the docker-compose file | ||
COMPOSE_FILE="${TEST_DIR}/docker-compose.yml" |
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.
most files use yaml
I believe not yml
script/test/cmd/generate_unit.sh
Outdated
} | ||
|
||
generate_os() { | ||
kompose convert --provider=openshift -f $COMPOSE_FILE -j -o $TEST_DIR/output-os.json |
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.
please use ./kompose
script/test/cmd/generate_unit.sh
Outdated
fi | ||
|
||
generate_k8s() { | ||
kompose convert -f $COMPOSE_FILE -j -o $TEST_DIR/output-k8s.json |
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.
please use ./kompose
@cdrage @surajnarwade review please |
@ashetty1 , can you add it in Makefile and bit of documentation, I am confused how to test it |
@surajnarwade Not sure if we should add it to Makefile. This is not a user-facing script. |
IMO, let's add it to makefile, it doesn't hurt adding more stuff to it. @ashetty1 |
It is not user-facing, but it is Kompose developer facing. This needs to be documented in Development Guide |
+1 for adding this to Makefile, otherwise it will be hard to find those scripts, it is much more convenient to run this from make |
@ashetty1 please merge commits into one 👍 |
Makefile
Outdated
@@ -66,6 +66,11 @@ test-openshift: | |||
test-cmd: | |||
./script/test/cmd/tests.sh | |||
|
|||
# generate commandline tests | |||
.PHONY: gen-cmd | |||
gen-cmd: |
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.
may be better to do generate-test-cmd
? wdyt @kadel
* Made an entry in the Makefile: `make gen-cmd` will run the script now * Added a section on adding CLI tests in development docs
This LGTM. Let's merge and go from there. |
Issue #770