summaryrefslogtreecommitdiffstats
path: root/src/tests/modules/always/set_rcode.unlang
blob: faaed287c5974a4babb780b1b2ca28f9b8e18aaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
#  Set status to "notfound". xlat should expand to previous status, "alive"
#
if ("%{db_status:notfound}" != "alive") {
	update reply {
		Filter-Id += "failed"
	}
}


#
#  Verify that the status was changed
#
db_status
if (!notfound) {
	update reply {
		Filter-Id += "failed"
	}
}


#
#  Fetch status using xlat without setting the status
#
if ("%{db_status:}" != "notfound") {
	update reply {
		Filter-Id += "failed"
	}
}


#
#  Verify that the status did not change
#
db_status
if (notfound) {
	update reply {
		Filter-Id += "success"
	}
}

update control {
	Cleartext-Password := "hello"
}