Skip to content

Commit

Permalink
(misc) Update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Dec 4, 2023
1 parent 5796c7a commit 9691982
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
3 changes: 1 addition & 2 deletions aagent/watchers/nagioswatcher/builtin_goss_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"bytes"
"encoding/json"
"fmt"
"time"

"github.com/goss-org/goss"
"github.com/goss-org/goss/outputs"
Expand All @@ -37,7 +36,7 @@ func (w *Watcher) watchUsingGoss() (state State, output string, err error) {
return UNKNOWN, fmt.Sprintf("UNKNOWN: goss configuration failed: %s", err), err
}

_, err = goss.Validate(cfg, time.Now())
_, err = goss.Validate(cfg)
if err != nil {
return UNKNOWN, fmt.Sprintf("UNKNOWN: goss validate failed: %s", err), err
}
Expand Down
13 changes: 9 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ require (
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/goss-org/goss v0.3.23
github.com/goss-org/goss v0.4.4
github.com/gosuri/uiprogress v0.0.1
github.com/guptarohit/asciigraph v0.5.6
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/looplab/fsm v1.0.1
github.com/miekg/pkcs11 v1.1.1
github.com/mitchellh/mapstructure v1.5.0
github.com/nats-io/jsm.go v0.1.1-0.20231020115352-7a5f8d21a5bc
github.com/nats-io/jsm.go v0.1.1-0.20231116110128-840023588118
github.com/nats-io/nats-server/v2 v2.10.6
github.com/nats-io/nats.go v1.31.0
github.com/nats-io/natscli v0.1.1-0.20231024093311-1da734567f3a
github.com/nats-io/natscli v0.1.2-0.20231204145229-10b7961a9c3d
github.com/onsi/ginkgo/v2 v2.13.2
github.com/onsi/gomega v1.30.0
github.com/open-policy-agent/opa v0.59.0
Expand Down Expand Up @@ -93,7 +93,7 @@ require (
github.com/imdario/mergo v0.3.16 // indirect
github.com/itchyny/gojq v0.12.14 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.8 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.9 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand All @@ -105,21 +105,26 @@ require (
github.com/miekg/dns v1.1.57 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.5.3 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nsc/v2 v2.8.6-0.20231117160437-b49262c20be8 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/oleiade/reflections v1.0.1 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/synadia-io/jwt-auth-builder.go v0.0.0-20231201125238-9011ec8a3346 // indirect
github.com/tadglines/go-pkgs v0.0.0-20210623144937-b983b20f54f9 // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand Down
25 changes: 17 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ github.com/goss-org/GOnetstat v0.0.0-20230101144325-22be0bd9e64d h1:50mlZKtg8BUv
github.com/goss-org/GOnetstat v0.0.0-20230101144325-22be0bd9e64d/go.mod h1:MBdRlloGIbpQVDuH5Gxg3hjqwZBCZsmFqbYPaeR6r0M=
github.com/goss-org/go-ps v0.0.0-20230609005227-7b318e6a56e5 h1:NW0Jo4leMIrQxNOyOkBu4yBnygI37m0Ey0EUUgvzr+8=
github.com/goss-org/go-ps v0.0.0-20230609005227-7b318e6a56e5/go.mod h1:FYj70SLmogHdTTDGnIVaaK0iczROlsxmoMCwfAUuIE8=
github.com/goss-org/goss v0.3.23 h1:JkKGg4d0YKZeEKzGBGY8j+6t/xXWqvGK7xO07O2eCZk=
github.com/goss-org/goss v0.3.23/go.mod h1:xRMT4WFVlnHy3F6JX/kYWyedQwgwe3NaIympUxSa4rk=
github.com/goss-org/goss v0.4.4 h1:PLRDVXetHzR4zE3k3pHz53TPlatLE9XxH2EgucxiNzo=
github.com/goss-org/goss v0.4.4/go.mod h1:Hgaa0vgan7HSEhyzxkUtSxvFUYT4RsWKPw3rgvswK+A=
github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY=
github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI=
github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw=
Expand All @@ -166,8 +166,8 @@ github.com/itchyny/gojq v0.12.14 h1:6k8vVtsrhQSYgSGg827AD+PVVaB1NLXEdX+dda2oZCc=
github.com/itchyny/gojq v0.12.14/go.mod h1:y1G7oO7XkcR1LPZO59KyoCRy08T3j9vDYRV0GgYSS+s=
github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE=
github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8=
github.com/jedib0t/go-pretty/v6 v6.4.8 h1:HiNzyMSEpsBaduKhmK+CwcpulEeBrTmxutz4oX/oWkg=
github.com/jedib0t/go-pretty/v6 v6.4.8/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
github.com/jedib0t/go-pretty/v6 v6.4.9 h1:vZ6bjGg2eBSrJn365qlxGcaWu09Id+LHtrfDWlB2Usc=
github.com/jedib0t/go-pretty/v6 v6.4.9/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
Expand Down Expand Up @@ -213,6 +213,8 @@ github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
Expand All @@ -225,18 +227,20 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/nats-io/jsm.go v0.1.1-0.20231020115352-7a5f8d21a5bc h1:5qxzZ/JFXkBgeTTMAmfwKxrS+v47NUKOxb3kiW7ZiXA=
github.com/nats-io/jsm.go v0.1.1-0.20231020115352-7a5f8d21a5bc/go.mod h1:Iq/uDQjS9LrF5KjJDmle/Cx0xzWDLpiRqo9wKJwmy/w=
github.com/nats-io/jsm.go v0.1.1-0.20231116110128-840023588118 h1:p4NgJiKAahSHQbnptu1iL6p3Nu0AKNs0VAY1ADwD9nE=
github.com/nats-io/jsm.go v0.1.1-0.20231116110128-840023588118/go.mod h1:wI5mFrR5Wa1ggI09Zo5qfyrvpqcBuzVp7THC2KX1lI4=
github.com/nats-io/jwt/v2 v2.5.3 h1:/9SWvzc6hTfamcgXJ3uYRpgj+QuY2aLNqRiqrKcrpEo=
github.com/nats-io/jwt/v2 v2.5.3/go.mod h1:iysuPemFcc7p4IoYots3IuELSI4EDe9Y0bQMe+I3Bf4=
github.com/nats-io/nats-server/v2 v2.10.6 h1:40U3ngyAKyC1tNT4Kw7PjuvivY74NTYD3qyIHxZUHKQ=
github.com/nats-io/nats-server/v2 v2.10.6/go.mod h1:IrTXS8o4Roa3G2kW8L5mEtSdmSrFjKhYb/m2g0gQ/vc=
github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E=
github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
github.com/nats-io/natscli v0.1.1-0.20231024093311-1da734567f3a h1:NtmzK5ADeOypJejrxZ0OD/7NAexfFAxERtrtdp3Lo94=
github.com/nats-io/natscli v0.1.1-0.20231024093311-1da734567f3a/go.mod h1:PCURldSpFa8+6ey8z4yoEafYKDHMi66Gv5079m3Dws4=
github.com/nats-io/natscli v0.1.2-0.20231204145229-10b7961a9c3d h1:EY6R87o6+82jlmDGoWyVqnXl+IVD/rlHxGd9VeO3PB0=
github.com/nats-io/natscli v0.1.2-0.20231204145229-10b7961a9c3d/go.mod h1:kswZD0/BERYVIw3Zj5A25komS1scun8iok/tMkhCNUE=
github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY=
github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts=
github.com/nats-io/nsc/v2 v2.8.6-0.20231117160437-b49262c20be8 h1:MqR1Fp9vHrcKcs3BMRmEnHaF7m+fcWiKJEWT6cInMNM=
github.com/nats-io/nsc/v2 v2.8.6-0.20231117160437-b49262c20be8/go.mod h1:iOC7u3x7LrisgXnlhk6TclXSZl4KI1r6OYqXf/l22m0=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
Expand Down Expand Up @@ -272,6 +276,8 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4=
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
Expand All @@ -295,6 +301,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/synadia-io/jwt-auth-builder.go v0.0.0-20231201125238-9011ec8a3346 h1:6oelWMT/lshfaMBFuMJ5ueCX67KXh7C8xpiXNnDMqFg=
github.com/synadia-io/jwt-auth-builder.go v0.0.0-20231201125238-9011ec8a3346/go.mod h1:vm/hZ9cVN5pPp1OVAzNZF7RPkTY8wMszri9MeaAjiHQ=
github.com/tadglines/go-pkgs v0.0.0-20140924210655-1f86682992f1/go.mod h1:roo6cZ/uqpwKMuvPG0YmzI5+AmUiMWfjCBZpGXqbTxE=
github.com/tadglines/go-pkgs v0.0.0-20210623144937-b983b20f54f9 h1:aeN+ghOV0b2VCmKKO3gqnDQ8mLbpABZgRR2FVYx4ouI=
github.com/tadglines/go-pkgs v0.0.0-20210623144937-b983b20f54f9/go.mod h1:roo6cZ/uqpwKMuvPG0YmzI5+AmUiMWfjCBZpGXqbTxE=
Expand Down Expand Up @@ -456,6 +464,7 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
rsc.io/goversion v1.2.0 h1:SPn+NLTiAG7w30IRK/DKp1BjvpWabYgxlLp/+kx5J8w=
rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
Expand Down
3 changes: 1 addition & 2 deletions scout/agent/scout/goss_validate_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"fmt"
"os"
"strings"
"time"

"github.com/choria-io/go-choria/inter"
"github.com/goss-org/goss"
Expand Down Expand Up @@ -120,7 +119,7 @@ func gossValidateAction(_ context.Context, req *mcorpc.Request, reply *mcorpc.Re
return
}

_, err = goss.Validate(cfg, time.Now())
_, err = goss.Validate(cfg)
if err != nil {
abort(fmt.Sprintf("Could not validate: %s", err), reply)
return
Expand Down
17 changes: 6 additions & 11 deletions scout/cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,9 @@ func (v *ValidateCommand) renderTableResult(table *xtablewriter.Table, vr *scout
case res.Result == resource.SKIP && v.opts.Display != "ok":
table.AddRow(skip, "", res.ResourceType, res.ResourceId, fmt.Sprintf("%s: skipped", res.Property))
case res.Result == resource.SUCCESS && v.opts.Display != "failed":
for _, e := range res.Expected {
table.AddRow(ok, "", res.ResourceType, res.ResourceId, fmt.Sprintf("%s: matches expectation: %v", res.Property, e))
}
table.AddRow(ok, "", res.ResourceType, res.ResourceId, res.SummaryLineCompact)
case res.Result == resource.FAIL && v.opts.Display != "ok":
for _, e := range res.Expected {
table.AddRow(fail, "", res.ResourceType, res.ResourceId, fmt.Sprintf("%s: does not match expectation: %v", res.Property, e))
}
table.AddRow(fail, "", res.ResourceType, res.ResourceId, res.SummaryLineCompact)
}
}

Expand Down Expand Up @@ -139,7 +135,7 @@ func (v *ValidateCommand) renderTextResult(vr *scoutagent.GossValidateResponse,
if lb {
fmt.Println()
}
fmt.Printf(" %s %s: %s: %s: skipped\n", v.fw.Colorize("yellow", "?"), res.ResourceType, res.ResourceId, res.Property)
fmt.Printf(" %s %s\n", v.fw.Colorize("yellow", "?"), res.SummaryLineCompact)
lb = false
case res.Result == resource.FAIL && v.opts.Display != "ok":
if i != 0 {
Expand All @@ -152,9 +148,8 @@ func (v *ValidateCommand) renderTextResult(vr *scoutagent.GossValidateResponse,
if lb {
fmt.Println()
}
for _, e := range res.Expected {
fmt.Printf(" %s %s: %s: %s: matches expectation: %v\n", v.fw.Colorize("green", "✓"), res.ResourceType, res.ResourceId, res.Property, e)
}

fmt.Printf(" %s %s\n", v.fw.Colorize("green", "✓"), res.SummaryLineCompact)

lb = false
}
Expand Down Expand Up @@ -197,7 +192,7 @@ func (v *ValidateCommand) localValidate() error {
return err
}

_, err = goss.Validate(cfg, time.Now())
_, err = goss.Validate(cfg)
if err != nil {
return err
}
Expand Down

0 comments on commit 9691982

Please sign in to comment.