summaryrefslogtreecommitdiffstats
path: root/tests/cunit/common.c
blob: dbd07cd2741b2deed1428dfbec79ad8a6ddb4ece (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



#include "wsman_config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>

#include "u/libu.h"
#include "wsman-client-api.h"
#include "wsman-xml-serializer.h"
#include "wsman-client-transport.h"

#include "common.h"


WsManClient *cl;
char *host = "langley.home.planux.com";




int init_test(void) {
  wsman_client_transport_init(NULL);
  if (getenv("OPENWSMAN_TEST_HOST")) {
    host = getenv("OPENWSMAN_TEST_HOST");
  }
  ServerData sd[] = {
    {"localhost", 8889, "/wsman", "http", "wsman", "secret"}
  };

  cl = wsman_create_client( 
		      sd[0].server,
		      sd[0].port,
		      sd[0].path,
		      sd[0].scheme,
		      sd[0].username,
		      sd[0].password);
  return 0;
}


int clean_test(void) {
  wsman_release_client(cl);
  wsman_client_transport_fini();
  return 0;
}