summaryrefslogtreecommitdiffstats
path: root/src/lib/rpc/unit-test/rpc_test.0/expire.exp
blob: e19cca0ef6138ada72ce5b1f1d53de797a6d52be (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
45
46
47
48
49
set timeout 40

load_lib "helpers.exp"

global server_started

proc expired {} {
    global spawn_id server_id

    start_client expired expired testuser notathena -1m 100
    eof_client expired expired $spawn_id 2

    expect {
	-i $server_id
	-re "rpc_test server: Authen.*failed:.*credential.*expired" { pass "expired" }
	timeout { fail "expired: timeout waiting for expired creds error" }
    }

    flush_server
}

# This test doesn't work after #6948, because the client won't try to
# authenticate using an expired TGT.
#if { $server_started } {expired }

proc overlap {} {
    global spawn_id

    start_client expire 1 testuser notathena 20m 100
    set client1_id $spawn_id
    flush_server
    
    start_client expire 2 testuser notathena 40m 300
    set client2_id $spawn_id
    flush_server
    
    start_client expire 3 testuser notathena 60m 500
    set client3_id $spawn_id
    flush_server
    
    eof_client expire 1 $client1_id 0
    eof_client expire 2 $client2_id 0
    eof_client expire 3 $client3_id 0

    flush_server
}
if { $server_started } {overlap}