CLEANUP: tests: remove sessionhash_test.c and test-cookie-appsess.cfg

These won't be usable anymore.
This commit is contained in:
Willy Tarreau 2015-08-10 19:12:52 +02:00
parent 9496552e7d
commit d38220c3ca
2 changed files with 0 additions and 90 deletions

View File

@ -1,54 +0,0 @@
#include <stdio.h>
#include <common/sessionhash.h>
int main(int argc, char *argv[])
{
appsess *a, *b, *c, *d, *tmp;
struct appsession_hash h;
int i;
a = malloc(sizeof(appsess));
b = malloc(sizeof(appsess));
c = malloc(sizeof(appsess));
d = malloc(sizeof(appsess));
a->sessid = "abcdefg";
b->sessid = "2c";
c->sessid = "pe";
d->sessid = "abbbbbccccb";
appsession_hash_init(&h, (void (*)())free);
appsession_hash_dump(&h);
appsession_hash_insert(&h, a);
appsession_hash_insert(&h, b);
appsession_hash_insert(&h, c);
appsession_hash_insert(&h, d);
appsession_hash_dump(&h);
printf("a: %p\n", a);
printf("b: %p\n", b);
printf("c: %p\n", c);
printf("d: %p\n", d);
printf("-------------\n");
printf("a: %p\n", appsession_hash_lookup(&h, "abcdefg"));
printf("b: %p\n", appsession_hash_lookup(&h, "2c"));
printf("c: %p\n", appsession_hash_lookup(&h, "pe"));
printf("d: %p\n", appsession_hash_lookup(&h, "abbbbbccccb"));
printf("null: %p\n", appsession_hash_lookup(&h, "non existant"));
appsession_hash_remove(&h, c);
appsession_hash_remove(&h, d);
appsession_hash_dump(&h);
printf("-- remove c,d\n");
printf("a: %p\n", appsession_hash_lookup(&h, "abcdefg"));
printf("b: %p\n", appsession_hash_lookup(&h, "2c"));
printf("c: %p\n", appsession_hash_lookup(&h, "pe"));
printf("d: %p\n", appsession_hash_lookup(&h, "abbbbbccccb"));
printf("null: %p\n", appsession_hash_lookup(&h, "non existant"));
appsession_hash_destroy(&h);
}

View File

@ -1,36 +0,0 @@
# Test configuration. It listens on port 8000, forwards to
# local ports 8001/8002 as two distinct servers, and relies
# on a server running on local port 8080 to handle the request.
global
maxconn 500
stats socket /tmp/sock1 mode 777 level admin
stats timeout 1d
defaults
mode http
option http-server-close
timeout client 30s
timeout server 30s
timeout connect 5s
listen test
log 127.0.0.1 local0
option httplog
bind :8000
appsession AS len 64 timeout 3h
cookie SID insert indirect
server s1 127.0.0.1:8001 cookie s1
server s2 127.0.0.1:8002 cookie s2
capture cookie toto= len 10
listen s1
bind 127.0.0.1:8001
server srv 127.0.0.1:8080
reqadd x-haproxy-used:\ s1
listen s2
bind 127.0.0.1:8002
server srv 127.0.0.1:8080
reqadd x-haproxy-used:\ s2