From d38220c3cad364d43cdb67b8a7c43ceefeb5cab0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 10 Aug 2015 19:12:52 +0200 Subject: [PATCH] CLEANUP: tests: remove sessionhash_test.c and test-cookie-appsess.cfg These won't be usable anymore. --- tests/sessionhash_test.c | 54 ----------------------------------- tests/test-cookie-appsess.cfg | 36 ----------------------- 2 files changed, 90 deletions(-) delete mode 100644 tests/sessionhash_test.c delete mode 100644 tests/test-cookie-appsess.cfg diff --git a/tests/sessionhash_test.c b/tests/sessionhash_test.c deleted file mode 100644 index cb05f8c75..000000000 --- a/tests/sessionhash_test.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include - -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); -} diff --git a/tests/test-cookie-appsess.cfg b/tests/test-cookie-appsess.cfg deleted file mode 100644 index 61e9dbf93..000000000 --- a/tests/test-cookie-appsess.cfg +++ /dev/null @@ -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 -