This is an automated email from the ASF dual-hosted git repository.
ofuks pushed a commit to branch DLAB-1476
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1476 by this push:
new 518c54c Added dir option to mock
518c54c is described below
commit 518c54c47edda8141e1f28aa96df014792b35a12
Author: Oleh Fuks <[email protected]>
AuthorDate: Wed Feb 19 14:54:38 2020 +0200
Added dir option to mock
---
.../dlab/backendapi/core/commands/CommandExecutorMockAsync.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
index bfa7af6..af87134 100644
---
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
+++
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
@@ -233,7 +233,7 @@ public class CommandExecutorMockAsync implements
Supplier<Boolean> {
* @throws FileNotFoundException may be thrown
*/
private String findTemplatesDir() throws FileNotFoundException {
- String dir =
"/opt/dlab/sources/infrastructure-provisioning/src/general/files/" +
cloudProvider.getName();
+ String dir = System.getProperty("docker.dir");
if (dir != null) {
dir = getAbsolutePath(dir);
@@ -256,6 +256,10 @@ public class CommandExecutorMockAsync implements
Supplier<Boolean> {
if (dirExists(dir)) {
return dir;
}
+ dir =
"/opt/dlab/sources/infrastructure-provisioning/src/general/files/" +
cloudProvider.getName();
+ if (dirExists(dir)) {
+ return dir;
+ }
throw new FileNotFoundException("Directory \"" + dir + "\" not
found. " +
"Please set the value docker.dir property to
the " +
"\".../infrastructure-provisioning/src/general/files/" +
cloudProvider.getName() + "\" directory");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]