registeruser.test.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief testing registeruser service. Test will only work once (after deploy)
4 
5  <h4> SAS Macros </h4>
6  @li mf_getuser.sas
7  @li mp_assertcolvals.sas
8  @li mx_testservice.sas
9 
10 **/
11 
12 %let _program=&appLoc/services/public/registeruser;
13 
14 /* remove user */
15 %let userid=%mf_getuser();
16 proc sql noprint;
17 delete from &dc_libref..mpe_users
18  where user_id="&userid";
19 
20 /* add user */
21 %mx_testservice(&_program,
22  viyacontext=&defaultcontext,
23  outlib=webout,
24  mdebug=&sasjs_mdebug
25 )
26 
27 data _null_;
28  infile "%sysfunc(pathname(webout))" lrecl=999999;
29  input;
30  putlog _infile_;
31 run;
32 
33 data work.return;
34  set webout.return;
35  putlog (_all_)(=);
36 run;
37 
38 data work.check;
39  msg='SUCCESS';
40 run;
41 %mp_assertcolvals(work.return.msg,
42  checkvals=work.check.msg,
43  desc=User successfully registered,
44  test=ALLVALS
45 )