mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 15:28:05 +00:00
fix tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package intercept
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/openziti/edge-api/rest_model"
|
||||
"github.com/openziti/edge/tunnel"
|
||||
"github.com/openziti/edge/tunnel/entities"
|
||||
@@ -17,8 +18,10 @@ func (self *testProvider) PrepForUse(serviceId string) {
|
||||
}
|
||||
|
||||
func (self *testProvider) GetCurrentIdentity() (*rest_model.IdentityDetail, error) {
|
||||
cost := rest_model.TerminatorCost(0)
|
||||
return &rest_model.IdentityDetail{
|
||||
Name: util.Ptr("foo.bar"),
|
||||
Name: util.Ptr("foo.bar"),
|
||||
DefaultHostingCost: &cost,
|
||||
AppData: &rest_model.Tags{
|
||||
SubTags: map[string]interface{}{
|
||||
"srcip": "123.456.789.10:5555",
|
||||
@@ -72,7 +75,14 @@ func Test_SourceIp(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_TemplateIdentity(t *testing.T) {
|
||||
svc := &entities.Service{}
|
||||
serviceId := uuid.NewString()
|
||||
svc := &entities.Service{
|
||||
ServiceDetail: rest_model.ServiceDetail{
|
||||
BaseEntity: rest_model.BaseEntity{
|
||||
ID: &serviceId,
|
||||
},
|
||||
},
|
||||
}
|
||||
hostTerminator := &entities.HostV2Terminator{ListenOptions: &entities.HostV2ListenOptions{}}
|
||||
provider := &testProvider{}
|
||||
currentIdentity, err := provider.GetCurrentIdentity()
|
||||
|
||||
Reference in New Issue
Block a user