Skip to content

Commit

Permalink
E2E: Fix failing custom mqtt proxy test (Azure#5156) (Azure#5229)
Browse files Browse the repository at this point in the history
The proxy tests are failing because the custom mqtt test test uses the TRC, which needs to call iothub for initializing itself. This causes a problem because the TRC was not configured to use the proxy config.

As a solution I have added the 1 line fix to initialize the TRC container with the proxy config.
Azure#5156
  • Loading branch information
and-rewsmith authored Jul 9, 2021
1 parent ab6304d commit df21e06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions builds/e2e/templates/e2e-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ steps:
E2E_BLOB_STORE_SAS: $(TestBlobStoreSas)
http_proxy: $(Agent.ProxyUrl)
https_proxy: $(Agent.ProxyUrl)
no_proxy: 'localhost'

- task: PublishTestResults@2
displayName: Publish test results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Devices.Edge.Test.Helpers

public class TestResultCoordinatorUtil
{
const string TestResultCoordinatorUrl = "http://testResultCoordinator:5001";
const string TestResultCoordinatorUrl = "http://localhost:5001/api/report";
const string TrcModuleName = "testResultCoordinator";
const string NetworkControllerModuleName = "networkController";

Expand Down Expand Up @@ -76,14 +76,15 @@ public static Action<EdgeConfigBuilder> BuildAddTestResultCoordinatorConfig(stri
["TestDescription"] = "network controller"
}
}
});
})
.WithProxy(Context.Current.TestRunnerProxy);
});
}

public static async Task ValidateResultsAsync()
{
HttpClient client = new HttpClient();
HttpResponseMessage response = await client.GetAsync("http://localhost:5001/api/report");
HttpResponseMessage response = await client.GetAsync(TestResultCoordinatorUrl);
var jsonstring = await response.Content.ReadAsStringAsync();
bool isPassed;
try
Expand Down

0 comments on commit df21e06

Please sign in to comment.