]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ci: Use different data in each LDAP user profile
authorNick Porter <nick@portercomputing.co.uk>
Fri, 22 Sep 2023 12:59:27 +0000 (13:59 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 22 Sep 2023 13:00:20 +0000 (14:00 +0100)
So we are sure the right thing happened

src/tests/modules/ldap/xlat_profile.attrs
src/tests/modules/ldap/xlat_profile.unlang
src/tests/salt-test-server/salt/ldap/base.ldif

index f3054470fc1c3fc7c8a2e75337110d863569d7f6..cba4c84c55d9f723dbb6faa0e2a6caa41dae06b8 100644 (file)
@@ -10,6 +10,6 @@ NAS-IP-Address = 1.2.3.5
 #  Expected answer
 #
 Packet-Type == Access-Accept
-Framed-IP-Netmask == 255.255.0.0
-Acct-Interim-Interval == 1800
+Framed-IP-Netmask == 255.255.128.0
+Acct-Interim-Interval == 3600
 Reply-Message == "User-Suspended"
index a79cadee3414494508eb6fcf7045ea3d4b399a17..3471ea63d3c802a651b672422dae738650a0fd16 100644 (file)
@@ -2,11 +2,11 @@ if (!%(ldap.profile:ldap:///cn=profile2,ou=profiles,dc=example,dc=com)) {
        test_fail
 }
 
-if (!((&reply.Framed-IP-Netmask == 255.255.0.0) && \
-      (&reply.Acct-Interim-Interval == 1800) && \
+if (!((&reply.Framed-IP-Netmask == 255.255.128.0) && \
+      (&reply.Acct-Interim-Interval == 3600) && \
       (&request.Service-Type == ::Framed-User) && \
-      (&control.Framed-IP-Address == 1.2.3.4) && \
-      (&control.Reply-Message == 'Hello world'))) {
+      (&control.Framed-IP-Address == 1.2.3.5) && \
+      (&control.Reply-Message == 'Bonjour'))) {
        test_fail
 }
 
index 5a9453fc3c02f4db9748dc8fd8f7b59e487e64a3..0ac7e41901af50173e4a0bc1cf5d40db251e7a1d 100644 (file)
@@ -82,12 +82,12 @@ radiusControlAttribute: Reply-Message := "Hello world"
 dn: cn=profile2,ou=profiles,dc=example,dc=com
 objectClass: freeradiusPolicy
 objectClass: radiusprofile
-cn: profile1
-radiusReplyAttribute: Framed-IP-Netmask := 255.255.0.0
-radiusReplyAttribute: Acct-Interim-Interval := 1800
+cn: profile2
+radiusReplyAttribute: Framed-IP-Netmask := 255.255.128.0
+radiusReplyAttribute: Acct-Interim-Interval := 3600
 radiusRequestAttribute: Service-Type := 'Framed-User'
-radiusControlAttribute: Framed-IP-Address := 1.2.3.4
-radiusControlAttribute: Reply-Message := "Hello world"
+radiusControlAttribute: Framed-IP-Address := 1.2.3.5
+radiusControlAttribute: Reply-Message := "Bonjour"
 
 dn: cn=suspended,ou=profiles,dc=example,dc=com
 objectClass: freeradiusPolicy