@@ -38,57 +38,39 @@ static void test_create_datastore_instance(void) {
38
38
39
39
assert_datastore_instance_equals_destroy (
40
40
"empty host" ,
41
- & ((nr_datastore_instance_t ){
42
- .host = "unknown" ,
43
- .database_name = "unknown" ,
44
- .port_path_or_id = "6379" ,
45
- }),
46
- nr_php_memcached_create_datastore_instance ("" , 6379 ));
47
-
48
- assert_datastore_instance_equals_destroy (
49
- "localhost socket" ,
50
- & ((nr_datastore_instance_t ){
51
- .host = system_host_name ,
52
- .database_name = "unknown" ,
53
- .port_path_or_id = "localhost" ,
54
- }),
55
- nr_php_memcached_create_datastore_instance ("localhost" , 0 ));
56
-
57
- assert_datastore_instance_equals_destroy (
58
- "localhost and port" ,
59
41
& ((nr_datastore_instance_t ){
60
42
.host = system_host_name ,
61
43
.database_name = "unknown" ,
62
- .port_path_or_id = "6379 " ,
44
+ .port_path_or_id = "unknown " ,
63
45
}),
64
- nr_php_memcached_create_datastore_instance ("localhost" , 6379 ));
46
+ nr_php_memcached_create_datastore_instance (NULL , 0 ));
65
47
66
48
assert_datastore_instance_equals_destroy (
67
49
"host.name socket" ,
68
50
& ((nr_datastore_instance_t ){
69
- .host = system_host_name ,
51
+ .host = "host.name" ,
70
52
.database_name = "unknown" ,
71
- .port_path_or_id = "host.name " ,
53
+ .port_path_or_id = "11211 " ,
72
54
}),
73
- nr_php_memcached_create_datastore_instance ("host.name" , 0 ));
55
+ nr_php_memcached_create_datastore_instance ("host.name" , 11211 ));
74
56
75
57
assert_datastore_instance_equals_destroy (
76
58
"host and port" ,
77
59
& ((nr_datastore_instance_t ){
78
- .host = "host.name " ,
60
+ .host = "unknown " ,
79
61
.database_name = "unknown" ,
80
62
.port_path_or_id = "6379" ,
81
63
}),
82
- nr_php_memcached_create_datastore_instance ("host.name " , 6379 ));
64
+ nr_php_memcached_create_datastore_instance ("" , 6379 ));
83
65
84
66
assert_datastore_instance_equals_destroy (
85
67
"NULL socket" ,
86
68
& ((nr_datastore_instance_t ){
87
- .host = system_host_name ,
69
+ .host = "unknown" ,
88
70
.database_name = "unknown" ,
89
- .port_path_or_id = "unknown " ,
71
+ .port_path_or_id = "11211 " ,
90
72
}),
91
- nr_php_memcached_create_datastore_instance (NULL , 0 ));
73
+ nr_php_memcached_create_datastore_instance (NULL , 11211 ));
92
74
}
93
75
94
76
void test_main (void * p NRUNUSED ) {
0 commit comments