blob: d0ce0abe3ff89b53847a4dab34adf999a151d18a (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#ifndef _COMMON_H
#define _COMMON_H
#include <CUnit/Basic.h>
#include "wsman-client-api.h"
typedef struct {
const char *server;
int port;
const char *path;
const char *scheme;
const char *username;
const char *password;
} ServerData;
typedef struct {
/* Explanation of what you should see */
const char *explanation;
/* Resource UR to test against */
const char *resource_uri;
const char *method;
/* Selectors in the form of a URI query key=value&key2=value2 */
char *selectors;
/* Properties in the form of a URI query key=value&key2=value2 */
char *properties;
char* expr1;
char* value1;
char *expr2;
char *value2;
/* What the final status code should be. */
unsigned int final_status;
unsigned char flags;
unsigned int max_elements;
/* pairs of string filter/value. The last pair is NULL/NULL */
char **filters;
char **common_filters;
} TestData;
extern char *host;
extern int verbose;
int init_test(void);
int clean_test(void);
int add_enumeration_tests(CU_pSuite ps);
int add_identify_tests(CU_pSuite ps);
int add_transfer_get_tests(CU_pSuite ps);
int add_transfer_put_tests(CU_pSuite ps);
int add_invoke_tests(CU_pSuite ps);
int add_pull_tests(CU_pSuite ps);
void check_response_header(WsXmlDocH doc, long resp_code, char *action);
void handle_filters(WsXmlDocH doc, char *f[]);
#endif
|