Saltstack now aligned with APPC
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-adapter-provider / src / main / java / org / onap / ccsdk / sli / adaptors / saltstack / model / SaltstackServerEmulator.java
index bac2cfe..7897656 100644 (file)
@@ -36,6 +36,7 @@ import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 
 import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -61,6 +62,9 @@ public class SaltstackServerEmulator {
                 result = rejectRequest(result, "Mocked: Fail");
             } else {
                 String fileName = params.get(SALTSTATE_FILE_NAME);
+                if (fileName == null) {
+                    throw new FileNotFoundException("No response file found");
+                }
                 result = acceptRequest(result, fileName);
             }
         } catch (Exception e) {