faas-cli icon indicating copy to clipboard operation
faas-cli copied to clipboard

Added unit test which covers imagename creation with registries on non default ports.

Open aidun opened this issue 5 years ago • 10 comments

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 avatar Mar 18 '20 20:03 aidun

@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

alexellis avatar Mar 19 '20 11:03 alexellis

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.

aidun avatar Mar 19 '20 11:03 aidun

OK no problem.

Are you planning on then going on to fix the code, now that you have a failing test? :-)

Alex

alexellis avatar Mar 19 '20 11:03 alexellis

I will provide a fix in the next days.

aidun avatar Mar 19 '20 12:03 aidun

@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.

aidun avatar Mar 22 '20 16:03 aidun

@viveksyngh a review has been requested.

alexellis avatar Mar 23 '20 10:03 alexellis

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.

alexellis avatar Apr 23 '20 15:04 alexellis

@aidun you mention that you are unhappy with the solution. Can you explain what you don't like about it?

LucasRoesler avatar Apr 24 '20 07:04 LucasRoesler

@LucasRoesler I don't feel comfortable with string operations and try to avoid such implementations. If you think it is okay, everything is fine.

aidun avatar May 02 '20 13:05 aidun

@LucasRoesler can you take a fresh look at this please?

alexellis avatar Aug 12 '20 15:08 alexellis