Browse Source

Fixing docker host default (#548)

* Prefer defaultHost

* no null

* fixing tests

* port as well
pull/550/merge
Justin Kotalik 6 years ago
committed by GitHub
parent
commit
224101f108
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Microsoft.Tye.Hosting/Model/Application.cs
  2. 2
      test/E2ETest/testassets/projects/health-checks/tye-liveness.yaml
  3. 2
      test/E2ETest/testassets/projects/health-checks/tye-none.yaml
  4. 2
      test/E2ETest/testassets/projects/health-checks/tye-proxy.yaml
  5. 2
      test/E2ETest/testassets/projects/health-checks/tye-readiness.yaml

7
src/Microsoft.Tye.Hosting/Model/Application.cs

@ -148,13 +148,8 @@ namespace Microsoft.Tye.Hosting.Model
foreach (var b in service.Description.Bindings)
{
var protocol = b.Protocol;
var host = b.Host ?? (isDockerRunInfo ? service.Description.Name : defaultHost);
var host = b.Host ?? defaultHost ?? (isDockerRunInfo ? service.Description.Name : "");
var port = b.Port;
if (b.Port is object && isDockerRunInfo)
{
port = b.ContainerPort ?? b.Port.Value;
}
bindings.Add(new EffectiveBinding(
service.Description.Name,

2
test/E2ETest/testassets/projects/health-checks/tye-liveness.yaml

@ -5,8 +5,6 @@ services:
- name: health-liveness
project: api/api.csproj
replicas: 3
bindings:
- port: 8002
liveness:
http:
path: /healthy

2
test/E2ETest/testassets/projects/health-checks/tye-none.yaml

@ -5,6 +5,4 @@ services:
- name: health-none
project: api/api.csproj
replicas: 3
bindings:
- port: 8001

2
test/E2ETest/testassets/projects/health-checks/tye-proxy.yaml

@ -5,8 +5,6 @@ services:
- name: health-proxy
project: api/api.csproj
replicas: 2
bindings:
- port: 8005
liveness:
http:
path: /healthy

2
test/E2ETest/testassets/projects/health-checks/tye-readiness.yaml

@ -5,8 +5,6 @@ services:
- name: health-readiness
project: api/api.csproj
replicas: 3
bindings:
- port: 8003
readiness:
http:
path: /ready

Loading…
Cancel
Save