From 088554728f790598262960f46a4e7947c8ef5d5c Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 1 May 2020 08:00:02 +0200 Subject: [PATCH 1/3] acctests: boosting the default concurrency to 20 --- .teamcity/components/settings.kt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.teamcity/components/settings.kt b/.teamcity/components/settings.kt index 65aaf070fb66..55e2d661c758 100644 --- a/.teamcity/components/settings.kt +++ b/.teamcity/components/settings.kt @@ -2,7 +2,7 @@ var defaultStartHour = 0 // specifies the default level of parallelism per-service-package -var defaultParallelism = 10 +var defaultParallelism = 20 var locations = mapOf( "public" to LocationConfiguration("westeurope", "eastus2", "francecentral", false), @@ -16,21 +16,12 @@ var runNightly = mapOf( // specifies a list of services which should be run with a custom test configuration var serviceTestConfigurationOverrides = mapOf( - // The API Management tests take ~45m each - "apimanagement" to testConfiguration(10, defaultStartHour), - - // Compute is a large package - "compute" to testConfiguration(10, defaultStartHour), - // The AKS API has a low rate limit "containers" to testConfiguration(5, defaultStartHour), // Data Lake has a low quota "datalake" to testConfiguration(2, defaultStartHour), - // Network is a large package - "network" to testConfiguration(10, defaultStartHour), - // SignalR only allows provisioning one "Free" instance at a time, // which is used in multiple tests "signalr" to testConfiguration(1, defaultStartHour) From 35d2c8e023fa60f679abbf960acf6c59f2beb826 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 1 May 2020 08:01:19 +0200 Subject: [PATCH 2/3] acctest: updating to v0.2.0 of tombuildsstuff/teamcity-go-test-json --- .teamcity/components/build_components.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.teamcity/components/build_components.kt b/.teamcity/components/build_components.kt index c2707c8977ae..66319c83fd7e 100644 --- a/.teamcity/components/build_components.kt +++ b/.teamcity/components/build_components.kt @@ -34,7 +34,7 @@ fun BuildSteps.RunAcceptanceTests(providerName : String, packageName: String) { } else { step(ScriptBuildStep { name = "Install tombuildsstuff/teamcity-go-test-json" - scriptContent = "wget https://github.com/tombuildsstuff/teamcity-go-test-json/releases/download/v0.1.0/teamcity-go-test-json_linux_amd64 && chmod +x teamcity-go-test-json_linux_amd64" + scriptContent = "wget https://github.com/tombuildsstuff/teamcity-go-test-json/releases/download/v0.2.0/teamcity-go-test-json_linux_amd64 && chmod +x teamcity-go-test-json_linux_amd64" }) var servicePath = "./%s/internal/services/%s/...".format(providerName, packageName) From 49758c038926bff3ca858c473047e46c2532465b Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 1 May 2020 08:07:36 +0200 Subject: [PATCH 3/3] acctests: hooking up ARM_CLIENT_ID_ALT and ARM_CLIENT_SECRET_ALT --- .teamcity/components/build_azure.kt | 9 ++++++++- .teamcity/components/project.kt | 1 + .teamcity/settings.kts | 4 +++- .teamcity/tests/helpers.kt | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.teamcity/components/build_azure.kt b/.teamcity/components/build_azure.kt index ac3faa8337e4..6f51ad1d5e06 100644 --- a/.teamcity/components/build_azure.kt +++ b/.teamcity/components/build_azure.kt @@ -1,6 +1,11 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.ParametrizedWithType -class ClientConfiguration(var clientId: String, var clientSecret: String, val subscriptionId : String, val tenantId : String) { +class ClientConfiguration(var clientId: String, + var clientSecret: String, + val subscriptionId : String, + val tenantId : String, + val altClientId: String, + val altClientSecret: String) { } class LocationConfiguration(var primary : String, var secondary : String, var ternary : String, var rotate : Boolean) { @@ -8,7 +13,9 @@ class LocationConfiguration(var primary : String, var secondary : String, var te fun ParametrizedWithType.ConfigureAzureSpecificTestParameters(environment: String, config: ClientConfiguration, locationsForEnv: LocationConfiguration) { hiddenPasswordVariable("env.ARM_CLIENT_ID", config.clientId, "The ID of the Service Principal used for Testing") + hiddenPasswordVariable("env.ARM_CLIENT_ID_ALT", config.altClientId, "The ID of the Alternate Service Principal used for Testing") hiddenPasswordVariable("env.ARM_CLIENT_SECRET", config.clientSecret, "The Client Secret of the Service Principal used for Testing") + hiddenPasswordVariable("env.ARM_CLIENT_SECRET_ALT", config.altClientSecret, "The Client Secret of the Alternate Service Principal used for Testing") hiddenVariable("env.ARM_ENVIRONMENT", environment, "The Azure Environment in which the tests are running") hiddenVariable("env.ARM_PROVIDER_DYNAMIC_TEST", "%b".format(locationsForEnv.rotate), "Should tests rotate between the supported regions?") hiddenPasswordVariable("env.ARM_SUBSCRIPTION_ID", config.subscriptionId, "The ID of the Azure Subscription used for Testing") diff --git a/.teamcity/components/project.kt b/.teamcity/components/project.kt index c9ca1281ffce..2c90be65d509 100644 --- a/.teamcity/components/project.kt +++ b/.teamcity/components/project.kt @@ -22,6 +22,7 @@ fun buildConfigurationsForServices(services: Map, providerName : var locationsForEnv = locations.get(environment)!! services.forEach { (serviceName, displayName) -> + // TODO: overriding locations var defaultTestConfig = testConfiguration(defaultParallelism, defaultStartHour) var testConfig = serviceTestConfigurationOverrides.getOrDefault(serviceName, defaultTestConfig) var runNightly = runNightly.getOrDefault(environment, false) diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index b501e5eaa348..07652cc06a1c 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -9,7 +9,9 @@ var clientSecret = DslContext.getParameter("clientSecret", "") var subscriptionId = DslContext.getParameter("subscriptionId", "") var tenantId = DslContext.getParameter("tenantId", "") var environment = DslContext.getParameter("environment", "public") +var clientIdAlt = DslContext.getParameter("clientIdAlt", "") +var clientSecretAlt = DslContext.getParameter("clientSecretAlt", "") -var clientConfig = ClientConfiguration(clientId, clientSecret, subscriptionId, tenantId) +var clientConfig = ClientConfiguration(clientId, clientSecret, subscriptionId, tenantId, clientIdAlt, clientSecretAlt) project(AzureRM(environment, clientConfig)) \ No newline at end of file diff --git a/.teamcity/tests/helpers.kt b/.teamcity/tests/helpers.kt index 1d9642c7fce1..2353a3259609 100644 --- a/.teamcity/tests/helpers.kt +++ b/.teamcity/tests/helpers.kt @@ -3,5 +3,5 @@ package tests import ClientConfiguration fun TestConfiguration() : ClientConfiguration { - return ClientConfiguration("clientId", "clientSecret", "subscriptionId", "tenantId") + return ClientConfiguration("clientId", "clientSecret", "subscriptionId", "tenantId", "altClientId", "altClientSecret") } \ No newline at end of file