File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -583,7 +583,7 @@ func defaultFleet() Fleet {
583
583
584
584
func defaultElastic () Elasticsearch {
585
585
return Elasticsearch {
586
- Protocol : "http " ,
586
+ Protocol : "https " ,
587
587
ServiceToken : "test-token" ,
588
588
Hosts : []string {"localhost:9200" },
589
589
MaxRetries : 3 ,
Original file line number Diff line number Diff line change @@ -26,8 +26,10 @@ import (
26
26
27
27
// The timeout would be driven by the server for long poll.
28
28
// Giving it some sane long value.
29
- const httpTransportLongPollTimeout = 10 * time .Minute
30
- const schemeHTTP = "http"
29
+ const (
30
+ httpTransportLongPollTimeout = 10 * time .Minute
31
+ schemeHTTP = "https"
32
+ )
31
33
32
34
var hasScheme = regexp .MustCompile (`^([a-z][a-z0-9+\-.]*)://` )
33
35
Original file line number Diff line number Diff line change 2
2
// or more contributor license agreements. Licensed under the Elastic License;
3
3
// you may not use this file except in compliance with the Elastic License.
4
4
5
- //go:build !integration
6
-
7
5
//nolint:dupl // duplicated lines used for test cases
8
6
package config
9
7
@@ -225,7 +223,7 @@ func TestToESConfig(t *testing.T) {
225
223
require .NoError (t , err )
226
224
227
225
expect := elasticsearch.Config {
228
- Addresses : []string {"http ://localhost:9200" },
226
+ Addresses : []string {"https ://localhost:9200" },
229
227
ServiceToken : "test-token" ,
230
228
Header : http.Header {"X-Elastic-Product-Origin" : []string {"fleet" }},
231
229
MaxRetries : 3 ,
@@ -258,7 +256,7 @@ func TestToESConfig(t *testing.T) {
258
256
require .NoError (t , err )
259
257
260
258
expect := elasticsearch.Config {
261
- Addresses : []string {"http ://localhost:9200" },
259
+ Addresses : []string {"https ://localhost:9200" },
262
260
Header : http.Header {"X-Elastic-Product-Origin" : []string {"fleet" }},
263
261
MaxRetries : 3 ,
264
262
Transport : & http.Transport {
You can’t perform that action at this time.
0 commit comments