1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-19 14:30:05 +00:00

fix: tests for ms_createwebservice and mp_createwebservice

This commit is contained in:
Allan Bowe
2022-04-25 21:33:14 +00:00
parent f9b0f87f44
commit 8bd31e6c97
6 changed files with 80 additions and 10 deletions

15
all.sas
View File

@@ -3841,6 +3841,7 @@ Usage:
<h4> SAS Macros </h4>
@li mf_getplatform.sas
@li mm_createwebservice.sas
@li ms_createwebservice.sas
@li mv_createwebservice.sas
@param [in,out] path= The full folder path where the service will be created
@@ -3852,7 +3853,7 @@ Usage:
be added
@param [in] replace= (YES) Select YES to replace any existing service in that
location
@param [in] mDebug= (0) set to 1 to show debug messages in the log
@version 9.2
@author Allan Bowe
@@ -3865,6 +3866,7 @@ Usage:
,code=ft15f001
,desc=This service was created by the mp_createwebservice macro
,replace=YES
,mdebug=0
)/*/STORE SOURCE*/;
%if &syscc ge 4 %then %do;
@@ -3885,9 +3887,11 @@ Usage:
%end;
%else %if &platform=SASJS %then %do;
%if "&path"="HOME" %then %let path=/Users/&_sasjs_username/My Folder;
%ms_createfile(&path/&name..sas
,inref=&code
,prerefs=&precode
%ms_createwebservice(path=&path
,name=&name
,code=&code
,precode=&precode
,mdebug=&mdebug
)
%end;
%else %do;
@@ -19221,6 +19225,9 @@ options &optval;
@li mf_getuser.sas
@li mf_getuniquename.sas
<h4> Related Files </h4>
@li ms_createwebservice.test.sas
@version 9.2
@author Allan Bowe

View File

@@ -29,6 +29,7 @@ Usage:
<h4> SAS Macros </h4>
@li mf_getplatform.sas
@li mm_createwebservice.sas
@li ms_createwebservice.sas
@li mv_createwebservice.sas
@param [in,out] path= The full folder path where the service will be created
@@ -40,7 +41,7 @@ Usage:
be added
@param [in] replace= (YES) Select YES to replace any existing service in that
location
@param [in] mDebug= (0) set to 1 to show debug messages in the log
@version 9.2
@author Allan Bowe
@@ -53,6 +54,7 @@ Usage:
,code=ft15f001
,desc=This service was created by the mp_createwebservice macro
,replace=YES
,mdebug=0
)/*/STORE SOURCE*/;
%if &syscc ge 4 %then %do;
@@ -73,9 +75,11 @@ Usage:
%end;
%else %if &platform=SASJS %then %do;
%if "&path"="HOME" %then %let path=/Users/&_sasjs_username/My Folder;
%ms_createfile(&path/&name..sas
,inref=&code
,prerefs=&precode
%ms_createwebservice(path=&path
,name=&name
,code=&code
,precode=&precode
,mdebug=&mdebug
)
%end;
%else %do;

View File

@@ -45,6 +45,9 @@
@li mf_getuser.sas
@li mf_getuniquename.sas
<h4> Related Files </h4>
@li ms_createwebservice.test.sas
@version 9.2
@author Allan Bowe

View File

@@ -0,0 +1,28 @@
/**
@file
@brief Testing ms_createwebservice.sas macro
<h4> SAS Macros </h4>
@li mf_getuniquefileref.sas
@li mp_assertscope.sas
@li mp_createwebservice.sas
**/
%let path=&mcTestAppLoc/mp_createwebservice;
%let name=myservice;
%let fref=%mf_getuniquefileref();
data _null_;
file &fref lrecl=3000;
put '%put hello world;';
run;
%mp_assertscope(SNAPSHOT)
%mp_createwebservice(path=&path,name=&name,code=&fref,mdebug=&sasjs_mdebug)
%mp_assertscope(COMPARE)

View File

@@ -0,0 +1,28 @@
/**
@file
@brief Testing ms_createwebservice.sas macro
<h4> SAS Macros </h4>
@li mf_getuniquefileref.sas
@li mp_assertscope.sas
@li ms_createwebservice.sas
**/
%let path=&mcTestAppLoc/ms_createwebservice;
%let name=myservice;
%let fref=%mf_getuniquefileref();
data _null_;
file &fref lrecl=3000;
put '%put hello world;';
run;
%mp_assertscope(SNAPSHOT)
%ms_createwebservice(path=&path,name=&name,code=&fref,mdebug=&sasjs_mdebug)
%mp_assertscope(COMPARE)

View File

@@ -3,13 +3,13 @@
@brief init file for tests
<h4> SAS Macros </h4>
@li mf_uid.sas
@li mp_init.sas
@li mv_webout.sas
**/
/* location in metadata or SAS Drive for temporary files */
%let mcTestAppLoc=/Public/temp/macrocore;
%let mcTestAppLoc=/tmp/tests/sasjs/core/%mf_uid();
/* set defaults */
%mp_init()