1
0
Форкнуть 0
* update tests to run all from north Europe location
* switch back to MCR terraform-test image
* fix typo in test function name
This commit is contained in:
Julien Corioland 2021-06-07 08:42:58 +02:00 коммит произвёл GitHub
Родитель 57e01a1b7a
Коммит 90a1c92d45
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -1,8 +1,8 @@
# Pull the base image with given version.
ARG BUILD_TERRAFORM_VERSION="0.14.4"
FROM jcorioland/terraform-test:${BUILD_TERRAFORM_VERSION}
FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}
ARG MODULE_NAME="terraform-azure-devops-eagent-aci"
ARG MODULE_NAME="terraform-azure-devops-agent-aci"
# Declare default build configurations for terraform.
ARG BUILD_ARM_SUBSCRIPTION_ID=""

Просмотреть файл

@ -10,12 +10,12 @@ import (
"testing"
"time"
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2020-11-01/containerinstance"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/gruntwork-io/terratest/modules/terraform"
test_structure "github.com/gruntwork-io/terratest/modules/test-structure"
"github.com/microsoft/azure-devops-go-api/azuredevops"
"github.com/microsoft/azure-devops-go-api/azuredevops/taskagent"
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2020-11-01/containerinstance"
"github.com/Azure/go-autorest/autorest/azure/auth"
)
// This function tests the deployment of Azure DevOps Linux agents
@ -153,8 +153,8 @@ func TestDeployAzureDevOpsLinuxAgentsWithManagedIdentities(t *testing.T) {
}
if expectedAgentSystemIdentitiesCount != systemIdentitiesCount || expectedAgentUserAssignedIdentitiesCount != userAssignedIdentitiesCount {
t.Fatalf("Test failed. System identities: %d (actual) vs %d (expected), user assigned identities %d (actual) vs %d (expected)",
systemIdentitiesCount, expectedAgentSystemIdentitiesCount, userAssignedIdentitiesCount, expectedAgentUserAssignedIdentitiesCount)
t.Fatalf("Test failed. System identities: %d (actual) vs %d (expected), user assigned identities %d (actual) vs %d (expected)",
systemIdentitiesCount, expectedAgentSystemIdentitiesCount, userAssignedIdentitiesCount, expectedAgentUserAssignedIdentitiesCount)
}
if expectedAgentUserAssignedIdentitiesCount != userAssignedIdentitiesCount {
@ -321,7 +321,7 @@ func TestDeployAzureDevOpsLinuxAndWindowsAgents(t *testing.T) {
}
// This function tests the deployment of Azure DevOps Linux agents into an existing resource group
func TestDeployAzureDevOpsLinuxAgentsIntoExistingRresourceGroup(t *testing.T) {
func TestDeployAzureDevOpsLinuxAgentsIntoExistingResourceGroup(t *testing.T) {
t.Parallel()
fixtureFolder := "./fixture/linux-agents-import-rg"
@ -513,7 +513,7 @@ func getAgentPool(ctx context.Context, devopsTaskAgentClient taskagent.Client, d
return &(*matchingAgentPools)[0], nil
}
func removeQuotes(s string) (string) {
func removeQuotes(s string) string {
if len(s) > 0 && s[0] == '"' {
s = s[1:]
}
@ -521,4 +521,4 @@ func removeQuotes(s string) (string) {
s = s[:len(s)-1]
}
return s
}
}

Просмотреть файл

@ -16,7 +16,7 @@ variable "azure_devops_personal_access_token" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westeurope"
default = "northeurope"
}
variable "agent_docker_image" {

Просмотреть файл

@ -16,7 +16,7 @@ variable "azure_devops_personal_access_token" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westeurope"
default = "northeurope"
}
variable "agent_docker_image" {

Просмотреть файл

@ -16,7 +16,7 @@ variable "azure_devops_personal_access_token" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westeurope"
default = "northeurope"
}
variable "agent_docker_image" {

Просмотреть файл

@ -16,7 +16,7 @@ variable "azure_devops_personal_access_token" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westus"
default = "northeurope"
}
variable "agent_docker_image" {

Просмотреть файл

@ -16,7 +16,7 @@ variable "azure_devops_personal_access_token" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westeurope"
default = "northeurope"
}
variable "agent_docker_image" {

Просмотреть файл

@ -23,7 +23,7 @@ variable "windows_azure_devops_pool_name" {
variable "location" {
type = string
description = "The Azure location to use"
default = "westeurope"
default = "northeurope"
}
variable "linux_agent_docker_image" {