Loading...
Searching...
No Matches
mpe_checkrestore.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mpe_checkrestore macro
4 @details Checking functionality of mpe_checkrestore.sas macro
5
6 <h4> SAS Macros </h4>
7 @li dc_getsettings.sas
8 @li mpe_checkrestore.sas
9 @li mp_assert.sas
10 @li mp_assertscope.sas
11 @li mp_testservice.sas
12
13
14 @author 4GL Apps Ltd
15 @copyright 4GL Apps Ltd. This code may only be used within Data Controller
16 and may not be re-distributed or re-sold without the express permission of
17 4GL Apps Ltd.
18
19**/
20
21/* first, run a data update */
22%mp_testservice(&appLoc/tests/services/auditors/postdata.test.1,
23 viyacontext=&defaultcontext
24)
25
26/* now grab the latest update */
27%let loadref=0;
28data APPROVE1;
29 set &mpelib..mpe_submit end=last;
30 if last then call symputx('loadref',table_id);
31run;
32
33%global dc_repo_users dc_macros dc_libref dc_staging_area dc_admin_group
34 mpelib dc_dttmtfmt;
35%dc_getsettings()
36
37%put checking it is restorable;
38%mp_assertscope(SNAPSHOT)
39%mpe_checkrestore(&loadref,outresult=ALLOW_RESTORE,outreason=REASON)
40%mp_assertscope(COMPARE,
41 desc=Checking macro variables against previous snapshot,
42 ignorelist=ALLOW_RESTORE REASON
43 MC0_JADP1LEN MC0_JADP2LEN MC0_JADP3LEN MC0_JADPNUM MC0_JADVLEN
44)
45
46%mp_assert(
47 iftrue=(&syscc=0),
48 desc=Checking successful submission
49)
50%mp_assert(
51 iftrue=(&ALLOW_RESTORE=YES),
52 desc=Checking restoring is possible
53)
54%mp_assert(
55 iftrue=(&REASON=IS ADMIN),
56 desc=Checking reason code returned
57)