Added unit test which covers imagename creation with registries on non default ports.
Added unit test which covers imagename creation with registries on non default ports.
Description
Motivation and Context
- [ ] I have raised an issue to propose this change (required)
How Has This Been Tested?
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [x] I have signed-off my commits with
git commit -s - [x] I have added tests to cover my changes.
- [] All new and existing tests passed.
@aidun please can you fix the CI failure? You should have seen this when the PR was raised, but if you missed it, pleased take a look.
Also the commit message is truncated for the commit subject, I think we've spoken about this before, but if in doubt, see the contributing guide for how to wrap the commit message.
https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md#commit-messages
This is a PR to show the tests are failing. You ask me to do it. Because of this it is a draft.
I this is okay, I have to fix the function. Then I will provide a polished PR.
Maybe I miss understood you on slack.
OK no problem.
Are you planning on then going on to fix the code, now that you have a failing test? :-)
Alex
I will provide a fix in the next days.
@alexellis I provided a fix for the issue. I dont feel comfortable with it, because I found no "good" way to check it. Maybe you or someone other can provide feedback on this.
@viveksyngh a review has been requested.
Sorry that you haven't had a review yet. Let me see if @LucasRoesler has some time to take a quick look. The unit test looks good, but do we have a unit test that checks that the old behaviour still works? (we may already have it)
Lucas I think we were just looking for some advice on the style / approach on checking the implementation.
@aidun you mention that you are unhappy with the solution. Can you explain what you don't like about it?
@LucasRoesler I don't feel comfortable with string operations and try to avoid such implementations. If you think it is okay, everything is fine.
@LucasRoesler can you take a fresh look at this please?