Skip to content

Commit 6913fa7

Browse files
committed
Update mock-es
1 parent 42c8bf9 commit 6913fa7

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ require (
2121
github.com/elastic/go-licenser v0.4.1
2222
github.com/elastic/go-sysinfo v1.14.0
2323
github.com/elastic/go-ucfg v0.8.8
24+
github.com/elastic/mock-es v0.0.0-20240605193845-b5546a703d6f
2425
github.com/fatih/color v1.15.0
2526
github.com/fsnotify/fsnotify v1.7.0
2627
github.com/gofrs/flock v0.8.1
@@ -36,7 +37,6 @@ require (
3637
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
3738
github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd
3839
github.com/kardianos/service v1.2.1-0.20210728001519-a323c3813bc7
39-
github.com/leehinman/mock-es v0.0.0-20240429182736-ca60117f3957
4040
github.com/magefile/mage v1.15.0
4141
github.com/mitchellh/gox v1.0.1
4242
github.com/mitchellh/hashstructure v1.1.0
@@ -180,6 +180,7 @@ require (
180180
github.com/mattn/go-colorable v0.1.13 // indirect
181181
github.com/mattn/go-isatty v0.0.17 // indirect
182182
github.com/mattn/go-runewidth v0.0.15 // indirect
183+
github.com/mileusna/useragent v1.3.4 // indirect
183184
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
184185
github.com/mitchellh/copystructure v1.2.0 // indirect
185186
github.com/mitchellh/go-homedir v1.1.0 // indirect

go.sum

+4-2
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,8 @@ github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQ
829829
github.com/elastic/gojsonschema v1.2.1/go.mod h1:biw5eBS2Z4T02wjATMRSfecfjCmwaDPvuaqf844gLrg=
830830
github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4=
831831
github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
832+
github.com/elastic/mock-es v0.0.0-20240605193845-b5546a703d6f h1:qo0Nn9G+p7HbG+CmiWwSoiKJ/cyRq59TRn9Z2PRHTi8=
833+
github.com/elastic/mock-es v0.0.0-20240605193845-b5546a703d6f/go.mod h1:mVdKBYYwt30xRFjCegbcURHh+3LWOCkQM33fgWbUiRI=
832834
github.com/elastic/package-spec/v2 v2.6.0/go.mod h1:ks9/FaVOS+vCrGRQcDvXAd2FlmB84mrLikbRiO6ACuk=
833835
github.com/elastic/pkcs8 v1.0.0 h1:HhitlUKxhN288kcNcYkjW6/ouvuwJWd9ioxpjnD9jVA=
834836
github.com/elastic/pkcs8 v1.0.0/go.mod h1:ipsZToJfq1MxclVTwpG7U/bgeDtf+0HkUiOxebk95+0=
@@ -1322,8 +1324,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
13221324
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
13231325
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
13241326
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
1325-
github.com/leehinman/mock-es v0.0.0-20240429182736-ca60117f3957 h1:jE5iCSPlxSsa2o5KOr+8rB/rogjjxB6nKfyWnjMo5kw=
1326-
github.com/leehinman/mock-es v0.0.0-20240429182736-ca60117f3957/go.mod h1:LXatisUwJ1ttE9W7iFi9XzrY9WdexSBVnHKtFcMIH0E=
13271327
github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg=
13281328
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0=
13291329
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg=
@@ -1406,6 +1406,8 @@ github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKju
14061406
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
14071407
github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
14081408
github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
1409+
github.com/mileusna/useragent v1.3.4 h1:MiuRRuvGjEie1+yZHO88UBYg8YBC/ddF6T7F56i3PCk=
1410+
github.com/mileusna/useragent v1.3.4/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc=
14091411
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
14101412
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
14111413
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=

testing/integration/logs_ingestion_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ import (
3838
"github.com/elastic/elastic-agent/testing/installtest"
3939
"github.com/elastic/elastic-transport-go/v8/elastictransport"
4040

41-
mockes "github.com/leehinman/mock-es"
4241
"github.com/rcrowley/go-metrics"
4342
"github.com/stretchr/testify/assert"
4443
"github.com/stretchr/testify/require"
44+
45+
mockes "github.com/elastic/mock-es/pkg/api"
4546
)
4647

4748
func TestLogIngestionFleetManaged(t *testing.T) {
@@ -462,10 +463,12 @@ func getLogFilenames(
462463
func startMockES(t *testing.T) string {
463464
registry := metrics.NewRegistry()
464465
uid := uuid.New()
466+
clusterUUID := uuid.New().String()
465467

466468
mux := http.NewServeMux()
467469
mux.Handle("/", mockes.NewAPIHandler(
468470
uid,
471+
clusterUUID,
469472
registry,
470473
time.Now().Add(time.Hour), 0, 0, 100, 0))
471474

0 commit comments

Comments
 (0)