Skip to content

Commit

Permalink
test: validate action endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Jun 21, 2024
1 parent 929e7c2 commit 640c1b4
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 67 deletions.
13 changes: 11 additions & 2 deletions e2e/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"context"
"github.com/rs/zerolog/log"
"github.com/steadybit/action-kit/go/action_kit_test/e2e"
actValidate "github.com/steadybit/action-kit/go/action_kit_test/validate"
"github.com/steadybit/discovery-kit/go/discovery_kit_api"
"github.com/steadybit/discovery-kit/go/discovery_kit_test/validate"
disValidate "github.com/steadybit/discovery-kit/go/discovery_kit_test/validate"
"github.com/steadybit/extension-kit/extlogging"
"github.com/steadybit/extension-prometheus/extinstance"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -43,11 +44,19 @@ func TestWithMinikube(t *testing.T) {
Name: "target discovery",
Test: testDiscovery,
},
{
Name: "validate Actions",
Test: validateActions,
},
})
}

func validateDiscovery(t *testing.T, _ *e2e.Minikube, e *e2e.Extension) {
assert.NoError(t, validate.ValidateEndpointReferences("/", e.Client))
assert.NoError(t, disValidate.ValidateEndpointReferences("/", e.Client))
}

func validateActions(t *testing.T, _ *e2e.Minikube, e *e2e.Extension) {
assert.NoError(t, actValidate.ValidateEndpointReferences("/", e.Client))
}

func testDiscovery(t *testing.T, _ *e2e.Minikube, e *e2e.Extension) {
Expand Down
45 changes: 22 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module github.com/steadybit/extension-prometheus

go 1.22.0

toolchain go1.22.2
toolchain go1.22.4

require (
github.com/KimMachineGun/automemlimit v0.6.1
Expand All @@ -16,12 +16,12 @@ require (
github.com/rs/zerolog v1.33.0
github.com/steadybit/action-kit/go/action_kit_api/v2 v2.9.0
github.com/steadybit/action-kit/go/action_kit_sdk v1.1.9
github.com/steadybit/action-kit/go/action_kit_test v1.2.14
github.com/steadybit/action-kit/go/action_kit_test v1.2.15
github.com/steadybit/discovery-kit/go/discovery_kit_api v1.5.2
github.com/steadybit/discovery-kit/go/discovery_kit_commons v0.1.0
github.com/steadybit/discovery-kit/go/discovery_kit_sdk v1.0.6
github.com/steadybit/discovery-kit/go/discovery_kit_sdk v1.0.7
github.com/steadybit/discovery-kit/go/discovery_kit_test v1.1.2
github.com/steadybit/extension-kit v1.8.14
github.com/steadybit/extension-kit v1.8.15
github.com/stretchr/testify v1.9.0
github.com/testcontainers/testcontainers-go v0.31.0
go.uber.org/automaxprocs v1.5.3
Expand All @@ -34,7 +34,7 @@ require (
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cilium/ebpf v0.14.0 // indirect
github.com/cilium/ebpf v0.15.0 // indirect
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/containerd v1.7.15 // indirect
github.com/containerd/log v0.1.0 // indirect
Expand All @@ -48,7 +48,7 @@ require (
github.com/elastic/go-windows v1.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/getkin/kin-openapi v0.124.0 // indirect
github.com/getkin/kin-openapi v0.125.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand All @@ -64,10 +64,10 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/invopop/yaml v0.3.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.3 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand Down Expand Up @@ -95,46 +95,45 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/zmwangx/debounce v1.0.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.19.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect
google.golang.org/grpc v1.58.3 // indirect
google.golang.org/protobuf v1.34.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
howett.net/plist v1.0.1 // indirect
k8s.io/api v0.30.0 // indirect
k8s.io/apimachinery v0.30.0 // indirect
k8s.io/client-go v0.30.0 // indirect
k8s.io/api v0.30.2 // indirect
k8s.io/apimachinery v0.30.2 // indirect
k8s.io/client-go v0.30.2 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 640c1b4

Please sign in to comment.