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

DT-1182: Fix issue where integration tests would delete the jade service account #1897

Merged
merged 1 commit into from
Jan 30, 2025
Merged
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 @@ -16,6 +16,7 @@
import bio.terra.service.resourcemanagement.google.GoogleResourceManagerService;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.opentelemetry.api.OpenTelemetry;
import java.io.IOException;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -53,10 +54,10 @@
public class IntegrationTestConfiguration {

@Bean("tdrServiceAccountEmail")
public String tdrServiceAccountEmail() {
// Provide a default value for the service account email when running a spring-context aware
// test to avoid having to set it in the test environment.
return "";
public String tdrServiceAccountEmail() throws IOException {
// Delegate to ApplicationConfiguration to get the service account email. Without this set,
// the service account would be deleted by tests on teardown.
return new ApplicationConfiguration().tdrServiceAccountEmail();
}

@Bean
Expand Down
Loading