-
Notifications
You must be signed in to change notification settings - Fork 311
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
fix: compose flag on okteto up #2804
Conversation
Signed-off-by: Javier López Barba <javier@okteto.com>
Codecov Report
@@ Coverage Diff @@
## master #2804 +/- ##
==========================================
+ Coverage 32.79% 32.83% +0.03%
==========================================
Files 158 158
Lines 18614 18626 +12
==========================================
+ Hits 6105 6115 +10
- Misses 11785 11786 +1
- Partials 724 725 +1
Continue to review full report at Codecov.
|
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
@@ -1019,6 +1020,21 @@ func (dev *Dev) ToTranslationRule(main *Dev, reset bool) *TranslationRule { | |||
|
|||
return rule | |||
} | |||
func getSubPathFromLocalPath(localPath string) string { | |||
wd, err := os.Getwd() |
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.
can we inject our dependencies for reading the file system? This will make unit testing much easier.
Optimally we would inject it at the top of our command, but for now to get this function's tests easier we can create the file reading dependencies in the caller
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.
That requires a whole refactor, which will be made in a future, so I think it will be better to work on it when we do the big refactor
* fix: compose flag on okteto up Signed-off-by: Javier López Barba <javier@okteto.com> * test: add test for non relative path Signed-off-by: Javier López Barba <javier@okteto.com> * refactor: encapsulate code into a function Signed-off-by: Javier López Barba <javier@okteto.com> * fix: unit tests Signed-off-by: Javier López Barba <javier@okteto.com>
* fix: compose flag on okteto up Signed-off-by: Javier López Barba <javier@okteto.com> * test: add test for non relative path Signed-off-by: Javier López Barba <javier@okteto.com> * refactor: encapsulate code into a function Signed-off-by: Javier López Barba <javier@okteto.com> * fix: unit tests Signed-off-by: Javier López Barba <javier@okteto.com>
* fix: compose flag on okteto up Signed-off-by: Javier López Barba <javier@okteto.com> * test: add test for non relative path Signed-off-by: Javier López Barba <javier@okteto.com> * refactor: encapsulate code into a function Signed-off-by: Javier López Barba <javier@okteto.com> * fix: unit tests Signed-off-by: Javier López Barba <javier@okteto.com>
This reverts commit 8d63511.
This reverts commit 8d63511.
This reverts commit 8d63511. Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba javier@okteto.com
Fixes #2789
Proposed changes