@@ -3,10 +3,10 @@ import { mockStandaloneRedisClient } from 'src/__mocks__';
3
3
import { getHostingProvider } from './hosting-provider-helper' ;
4
4
5
5
const getHostingProviderTests = [
6
- { input : '127.0.0.1' , output : HostingProvider . COMMUNITY_EDITION } ,
7
- { input : '0.0.0.0' , output : HostingProvider . COMMUNITY_EDITION } ,
8
- { input : 'localhost' , output : HostingProvider . COMMUNITY_EDITION } ,
9
- { input : '172.18.0.2' , output : HostingProvider . COMMUNITY_EDITION } ,
6
+ { input : '127.0.0.1' , output : HostingProvider . UKNOWN_LOCALHOST } ,
7
+ { input : '0.0.0.0' , output : HostingProvider . UKNOWN_LOCALHOST } ,
8
+ { input : 'localhost' , output : HostingProvider . UKNOWN_LOCALHOST } ,
9
+ { input : '172.18.0.2' , output : HostingProvider . UKNOWN_LOCALHOST } ,
10
10
{ input : '176.87.56.244' , output : HostingProvider . UNKNOWN } ,
11
11
{ input : '192.12.56.244' , output : HostingProvider . UNKNOWN } ,
12
12
{ input : '255.255.56.244' , output : HostingProvider . UNKNOWN } ,
@@ -32,6 +32,24 @@ const getHostingProviderTests = [
32
32
{ input : 'contoso5.redis.cache.windows.net' , output : HostingProvider . AZURE_CACHE } ,
33
33
{ input : 'contoso5.redisenterprise.cache.azure.net' , output : HostingProvider . AZURE_CACHE_REDIS_ENTERPRISE } ,
34
34
{ input : 'demo-redis-provider.unknown.com' , output : HostingProvider . UNKNOWN } ,
35
+ {
36
+ input : 'localhost' ,
37
+ hello : [
38
+ 'server' , 'redis' ,
39
+ ] ,
40
+ info : '#Server\r\n'
41
+ + 'executable:/opt/redis/bin/redis-server' ,
42
+ output : HostingProvider . COMMUNITY_EDITION ,
43
+ } ,
44
+ {
45
+ input : 'localhost' ,
46
+ hello : [
47
+ 'server' , 'redis' ,
48
+ ] ,
49
+ info : '#Server\r\n'
50
+ + 'executable:/opt/redis-stack/bin/redis-server' ,
51
+ output : HostingProvider . REDIS_STACK ,
52
+ } ,
35
53
{
36
54
input : 'localhost' ,
37
55
hello : [
@@ -45,7 +63,7 @@ const getHostingProviderTests = [
45
63
] ,
46
64
info : '#Server\r\n'
47
65
+ 'redis_version: 7.2.0' ,
48
- output : HostingProvider . REDIS_MANAGED ,
66
+ output : HostingProvider . REDIS_ENTERPRISE ,
49
67
} ,
50
68
{
51
69
input : 'localhost' ,
0 commit comments