Fix minor path in code 15/38715/1
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Mon, 26 Mar 2018 23:26:00 +0000 (16:26 -0700)
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Mon, 26 Mar 2018 23:26:00 +0000 (16:26 -0700)
This patch fixes a minor path minor issue which was found in CSIT tests.

Change-Id: I3ca957248211fe9e89eeee8d0fb5e2b0b4593c5b
Issue-ID: MUSIC-55
Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
deployment/Dockerfile
deployment/docker-build.sh
src/dkv/api/backendFilesystemConnection.go

index e9fe30d..1c1e3f6 100644 (file)
@@ -5,7 +5,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
 
 ENV http_proxy $HTTP_PROXY
 ENV https_proxy $HTTPS_PROXY
-ENV CONSUL_IP $CONSUL_IP
+ENV DATASTORE_IP $DATASTORE_IP
 ENV CONSUL_VERSION 1.0.6
 
 RUN apk update && \
@@ -27,12 +27,14 @@ EXPOSE 8080
 
 
 RUN mkdir /dkv_mount_path && \
+    mkdir /dkv_mount_path/api && \
     mkdir /dkv_mount_path/consul_data && \
     mkdir /dkv_mount_path/configs && \
     mkdir /dkv_mount_path/configs/default
 
 WORKDIR /dkv_mount_path
 ADD ./dkv /dkv_mount_path/
+ADD ./token_service_map.json /dkv_mount_path/api/
 ADD ./docker-entrypoint.sh /dkv_mount_path/
 
 ENTRYPOINT /dkv_mount_path/docker-entrypoint.sh
\ No newline at end of file
index 50a2a89..3b7e3b3 100755 (executable)
@@ -21,6 +21,9 @@ function generate_binary {
     make build
     popd
     cp ../target/dkv .
+
+    # Change the following work around for reading token_service.json
+    cp ../src/dkv/api/token_service_map.json .
 }
 
 function build_image {
index 519022c..4f2bb8e 100644 (file)
@@ -43,6 +43,10 @@ type DirectoryStruct struct {
        directory string
 }
 
+/*
+TODO(sshank): This needs to be made completely stateless or else each container running this API will not have
+same data in token_service_map.json
+*/
 const (
        JSONPATH = "api/token_service_map.json"
 )