Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
test:
strategy:
matrix:
go-version: [1.23.x, 1.24.x]
go-version: [stable, oldstable]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Test
run: go test ./...
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/elastic/mito

go 1.25.0
go 1.25.8

require (
aqwari.net/xml v0.0.0-20210331023308-d9421b293817
github.com/aws/aws-sdk-go-v2 v1.36.5
github.com/aws/aws-sdk-go-v2/config v1.29.17
github.com/goccy/go-yaml v1.9.5
github.com/golang/protobuf v1.5.2
github.com/google/cel-go v0.27.0
github.com/google/cel-go v0.28.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.3.0
github.com/rogpeppe/go-internal v1.13.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3K
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/cel-go v0.27.0 h1:e7ih85+4qVrBuqQWTW4FKSqZYokVuc3HnhH5keboFTo=
github.com/google/cel-go v0.27.0/go.mod h1:tTJ11FWqnhw5KKpnWpvW9CJC3Y9GK4EIS0WXnBbebzw=
github.com/google/cel-go v0.28.0 h1:KjSWstCpz/MN5t4a8gnGJNIYUsJRpdi/r97xWDphIQc=
github.com/google/cel-go v0.28.0/go.mod h1:X0bD6iVNR8pkROSOoHVdgTkzmRcosof7WQqCD6wcMc8=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
Expand Down
16 changes: 16 additions & 0 deletions testdata/error_text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
! mito -data data.json src.cel
cmp stderr want.txt

-- data.json --
{"url":"https://example.com/"}
-- src.cel --
get(state.url).Body.decode_json().records.map(r,
// ^~~~ https://example.com/ is not serving JSON.
get(state.url+'/'+r.id).Body.decode_json()
).as(events, {
"events": events,
})
-- want.txt --
failed eval: ERROR: <input>:1:32: failed to unmarshal JSON message: invalid character '<' looking for beginning of value
| get(state.url).Body.decode_json().records.map(r,
| ...............................^
4 changes: 2 additions & 2 deletions testdata/macro_error.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ cmp stderr want_err.txt
-- src.cel --
get(state.url+state.id).as(r, r.map(k, k))
-- want_err.txt --
failed eval: ERROR: <input>:1:31: no such overload
failed eval: ERROR: <input>:1:14: no such overload
| get(state.url+state.id).as(r, r.map(k, k))
| ..............................^
| .............^
2 changes: 1 addition & 1 deletion testdata/serve_tls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmpenv src.cel src_var.cel

! mito -use http src.cel
! stdout .
stderr 'failed eval: ERROR: <input>:2:62: Get "https://127.0.0.1:[0-9]{1,5}": (?:tls: failed to verify certificate: )?x509: (?:certificate signed by unknown authority|.*certificate is not trusted)'
stderr 'failed eval: ERROR: <input>:2:[0-9]{1,3}: Get "https://127.0.0.1:[0-9]{1,5}": (?:tls: failed to verify certificate: )?x509: (?:certificate signed by unknown authority|.*certificate is not trusted)'

mito -use http -insecure src.cel
cmp stdout want_insecure.txt
Expand Down
Loading