-
Notifications
You must be signed in to change notification settings - Fork 24
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
More thorough testing with pytest #68
Conversation
With this git_repo fixture, we can have a clean slate with fresh data to itneract with.
028997b
to
fe68e51
Compare
977f20f
to
2d2573f
Compare
7311723
to
8f251b3
Compare
UPDATE: Resolved without me understanding properly what happened. The test succeeds on my computer, but when I run them on travis and I arrive at the part where I do various monkeypatching things fail without providing an non-negative returncode in the following way: If someone has insight about what goes on here I'd be very interested. At this point in the code, we have already done various things, like used the |
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.
Woo! Super happy to see these tests getting added.
The cache issue in #68 (comment) resolved, or perhaps rather stopped messing with the rendered output that made me thing something was wrong. I added back lru_cache and and started clearing the lru_cache when it had become outdated using the .clear_cache() function. |
Co-Authored-By: Simon Li <orpheus+devel@gmail.com>
829bb2b
to
ec289b2
Compare
ec289b2
to
284e53b
Compare
- Bumping chart version on changes to chartpress.yaml, the helm chart folder, its dependent images, and optionally additional paths. Previous behavior was to bump chart version on any change to the folder where chartpress.yaml resided and optionally additional paths. - Bumping image version on change to Dockerfile residing outside of image build context should now work.
f482ee5
to
655223e
Compare
This is excellent, great job! |
Closes #67.
PR Status
Ready for review -> merge.
About test setup
The tests are setup by creating temporary git repositories where we copy a content. In the master branch of the temp git repo we put a test helm chart. In the gh-pages branch of the temp git repo we put a test helm chart repository containing the important index.yaml file.
Many tests work by capturing the output while running chartpress, and verifying that we find the right kind of statements in the output. It can be traces from chartpress itself, such as "Updating testchart/values.yaml with..." but also from docker such as "Successfully tagged..." or the
helm package
command etc.Added functionality: local chart
The
git_remote
function previously updated a passed "jupyterhub/helm-chart" string to be git@github.com:jupyterhub/helm-chart.git or similar. As I wanted to run tests without external dependencies etc, I made this function support being passed a.
string without updating it, which allowed me to work directly with the gh-pages branch of the git repository chartpress is running on.This also opens up the new possibility of not creating a dedicated helm-chart repo for the helm chart.
bugfix: version bumping depending on what paths?
In this PR there is a slight change of behavior because of a bug fix.
Previously, a change to this folder would give us a new version, now a change to the README.md wont. So it's not a big deal.