@@ -41,3 +41,88 @@ tests:
4141 - matchRegex :
4242 path : data.MONGO_URI
4343 pattern : mongodb://.*-mongodb:27017/hyperdx
44+
45+ - it : should use default frontendUrl template with appUrl and appPort
46+ set :
47+ hyperdx :
48+ apiPort : 8000
49+ appPort : 3000
50+ appUrl : " http://localhost"
51+ # frontendUrl should default to {{ .Values.hyperdx.appUrl }}:{{ .Values.hyperdx.appPort }}
52+ mongodb :
53+ port : 27017
54+ asserts :
55+ - equal :
56+ path : data.FRONTEND_URL
57+ value : " http://localhost:3000"
58+
59+ - it : should override frontendUrl when explicitly set
60+ set :
61+ hyperdx :
62+ apiPort : 8000
63+ appPort : 3000
64+ appUrl : " http://localhost"
65+ frontendUrl : " https://my-custom-domain.com"
66+ mongodb :
67+ port : 27017
68+ asserts :
69+ - equal :
70+ path : data.FRONTEND_URL
71+ value : " https://my-custom-domain.com"
72+
73+ - it : should support template expressions in frontendUrl
74+ set :
75+ hyperdx :
76+ apiPort : 8000
77+ appPort : 4000
78+ appUrl : " https://production-host"
79+ frontendUrl : " {{ .Values.hyperdx.appUrl }}:{{ .Values.hyperdx.appPort }}/app"
80+ mongodb :
81+ port : 27017
82+ asserts :
83+ - equal :
84+ path : data.FRONTEND_URL
85+ value : " https://production-host:4000/app"
86+
87+ - it : should handle custom appUrl and appPort in default frontendUrl
88+ set :
89+ hyperdx :
90+ apiPort : 8000
91+ appPort : 4000
92+ appUrl : " https://staging.example.com"
93+ # Using default frontendUrl template
94+ mongodb :
95+ port : 27017
96+ asserts :
97+ - equal :
98+ path : data.FRONTEND_URL
99+ value : " https://staging.example.com:4000"
100+
101+ - it : should work with ingress-style URLs in frontendUrl
102+ set :
103+ hyperdx :
104+ apiPort : 8000
105+ appPort : 3000
106+ appUrl : " http://localhost"
107+ frontendUrl : " https://hyperdx.example.com"
108+ mongodb :
109+ port : 27017
110+ asserts :
111+ - equal :
112+ path : data.FRONTEND_URL
113+ value : " https://hyperdx.example.com"
114+
115+ - it : should support complex template expressions
116+ set :
117+ hyperdx :
118+ apiPort : 8000
119+ appPort : 3000
120+ appUrl : " http://localhost"
121+ frontendUrl : " {{ if eq .Values.env \" production\" }}https://prod.example.com{{ else }}{{ .Values.hyperdx.appUrl }}:{{ .Values.hyperdx.appPort }}{{ end }}"
122+ env : " development"
123+ mongodb :
124+ port : 27017
125+ asserts :
126+ - equal :
127+ path : data.FRONTEND_URL
128+ value : " http://localhost:3000"
0 commit comments