public void UsingAServicePrincipalDoesNotCauseAWarning() { using (var logs = new ProxyLog()) { var convention = new AzureWebAppConvention(); var vars = new CalamariVariableDictionary(); vars.Set(SpecialVariables.Account.AccountType, "AzureServicePrincipal"); var deployment = new RunningDeployment("", vars); // ignore the incomplete setup, we just want to know about whether the warning is logged try { convention.Install(deployment); } catch (Exception) {} logs.StdOut.Contains("Use of Management Certificates to deploy Azure Web App services has been deprecated").Should().BeFalse(); } }
public void UsingAManagementCertificateCausesAWarning() { var log = new InMemoryLog(); var convention = new AzureWebAppConvention(log); var vars = new CalamariVariables(); vars.Set(SpecialVariables.Account.AccountType, "AzureSubscription"); var deployment = new RunningDeployment("", vars); // ignore the incomplete setup, we just want to know about whether the warning is logged try { convention.Install(deployment); } catch (Exception) { } log.StandardOut.Should().ContainMatch("Use of Management Certificates to deploy Azure Web App services has been deprecated*"); }