Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(azure/build): improve test times for azure #6246

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ class UpsertAzureLoadBalancerDescriptionValidatorSpec extends Specification {
UpsertAzureLoadBalancerDescriptionValidator validator

void setupSpec() {
azureCredentials = new AzureCredentials(ACCOUNT_CLIENTID, ACCOUNT_TENANTID, ACCOUNT_APPKEY, SUBSCRIPTION_ID, DEFAULT_KEY_VAULT, DEFAULT_RESOURCE_GROUP, "", "", false)
// GroovyMock is necessary for AzureCredentials becuase it's a groovy class
// See https://stackoverflow.com/questions/34121999/mock-final-class-in-spock
azureCredentials = GroovyMock(AzureCredentials)
azureCredentials.appKey >> ACCOUNT_TENANTID

def credentialsRepo = new MapBackedAccountCredentialsRepository()
def credentials = Mock(AzureNamedAccountCredentials)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AzureServerGroupResourceTemplateSpec extends Specification {
static AzureCredentials azureCredentials

def setupSpec() {
azureCredentials = new AzureCredentials("", "", "", "", "", "", "", "", false)
azureCredentials = GroovyMock(AzureCredentials)
}
void setup() {
description = createDescription(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class DestroyAzureServerGroupAtomicOperationSpec extends Specification {

def setupSpec() {
converter = new DestroyAzureServerGroupAtomicOperationConverter(objectMapper: mapper)
azureCredentials = new AzureCredentials(ACCOUNT_CLIENTID, ACCOUNT_TENANTID, ACCOUNT_APPKEY, SUBSCRIPTION_ID, DEFAULT_KEY_VAULT, DEFAULT_RESOURCE_GROUP, "", "", false)
azureCredentials = GroovyMock(AzureCredentials)

def credentialsRepo = new MapBackedAccountCredentialsRepository()
credentials = Mock(AzureNamedAccountCredentials)
Expand Down
Loading