fix(module,app): handle non existent interface in app url resolver
arcad/emissary/pipeline/head This commit looks good
Details
arcad/emissary/pipeline/head This commit looks good
Details
This commit is contained in:
parent
9dcddc5566
commit
b213b8d1ae
|
@ -151,6 +151,8 @@ func createResolveAppURL(specs *spec.Spec) (ResolveAppURLFunc, error) {
|
||||||
ctx, "could not find interface",
|
ctx, "could not find interface",
|
||||||
logger.E(errors.WithStack(err)), logger.F("iface", ifaceName),
|
logger.E(errors.WithStack(err)), logger.F("iface", ifaceName),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
addresses, err := iface.Addrs()
|
addresses, err := iface.Addrs()
|
||||||
|
|
|
@ -19,7 +19,8 @@ func TestCreateResolveAppURL(t *testing.T) {
|
||||||
Config: &spec.Config{
|
Config: &spec.Config{
|
||||||
AppURLResolving: &spec.AppURLResolving{
|
AppURLResolving: &spec.AppURLResolving{
|
||||||
IfaceMappings: map[string]string{
|
IfaceMappings: map[string]string{
|
||||||
"lo": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
"lo": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
||||||
|
"does-not-exists": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
||||||
},
|
},
|
||||||
DefaultURLTemplate: `http://{{ last ( splitList "." ( toString .Manifest.ID ) ) }}.arcad.local`,
|
DefaultURLTemplate: `http://{{ last ( splitList "." ( toString .Manifest.ID ) ) }}.arcad.local`,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue