-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factorize code of
ServerEvaluationStrategy
classes, to use the Cust…
…om strategy as the basis of other strategies (#5366) * Pull-up the local docker port management (use exposed ports) Signed-off-by: David Festal <dfestal@redhat.com> * Make all the strategies extend `CustomEvaluationStrategy` Signed-off-by: David Festal <dfestal@redhat.com> * Add a `workspaceIdWithoutPrefix` macro and use it for `single-port` This macro is based on the `workspaceId` macro, but without the `workspace` prefix. Signed-off-by: David Festal <dfestal@redhat.com> * Add the `isDevMachine` to allow conditions in the ST template. This is required to allow the `single-port` strategy to have a different url according to the type of machine. (see the work done for CHE-175 : Support multi-container workspaces on OpenShift) Signed-off-by: David Festal <dfestal@redhat.com> * Small fixes after comments from @fbenoit Signed-off-by: David Festal <dfestal@redhat.com> * Fix unnecessary space pointed out by @sunix Signed-off-by: David Festal <dfestal@redhat.com> * Remove unnecessary `else` as suggested by @sunix Signed-off-by: David Festal <dfestal@redhat.com> * Keep the method signatures compatible with the `condenvy` strategy Signed-off-by: David Festal <dfestal@redhat.com> * Align names of parameters of constructors (requested by @garagatyi) Signed-off-by: David Festal <dfestal@redhat.com> * Add a default implementation to avoid breaking the Codenvy build Signed-off-by: David Festal <dfestal@redhat.com> * Also rename the attributes Signed-off-by: David Festal <dfestal@redhat.com> * Use a constant for the `workspace` prefix string Signed-off-by: David Festal <dfestal@redhat.com> * Fix formatting as requested by @sunix Signed-off-by: David Festal <dfestal@redhat.com> * Use a constant for the `isDevMachine` macro name Signed-off-by: David Festal <dfestal@redhat.com> * Add unit tests for `workspaceIdWithoutPrefixè and `isDevMachine` macros Signed-off-by: David Festal <dfestal@redhat.com> * Another requested formatting fix Signed-off-by: David Festal <dfestal@redhat.com> * Make new tests clearer Signed-off-by: David Festal <dfestal@redhat.com> * yet another formatting request Signed-off-by: David Festal <dfestal@redhat.com> * Respect the original order of imports Signed-off-by: David Festal <dfestal@redhat.com> * remove unnecessary `toString()` Signed-off-by: David Festal <dfestal@redhat.com> * use a lowercase `S` in the `server-` prefix Signed-off-by: David Festal <dfestal@redhat.com>
- Loading branch information
1 parent
46b2f8c
commit a822958
Showing
10 changed files
with
251 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.