mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 00:06:38 +00:00
Migrate away from requests package for Function structs
The function deployment and status structs have been moved away into the faas-provider package. Tested with a build, running tests, and CI. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
8767514527
commit
df97efafae
@ -3,7 +3,7 @@ package metrics
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/openfaas/faas/gateway/requests"
|
||||
types "github.com/openfaas/faas-provider/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
)
|
||||
@ -67,12 +67,12 @@ func Test_Collect_CollectsTheNumberOfReplicasOfAService(t *testing.T) {
|
||||
metricsOptions := BuildMetricsOptions()
|
||||
exporter := NewExporter(metricsOptions, nil)
|
||||
|
||||
expectedService := requests.Function{
|
||||
expectedService := types.FunctionStatus{
|
||||
Name: "function_with_two_replica",
|
||||
Replicas: 2,
|
||||
}
|
||||
|
||||
exporter.services = []requests.Function{expectedService}
|
||||
exporter.services = []types.FunctionStatus{expectedService}
|
||||
|
||||
ch := make(chan prometheus.Metric)
|
||||
defer close(ch)
|
||||
|
Reference in New Issue
Block a user