Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -43,12 +43,15 @@ struct GenerateContentIntegrationTests {
let userID1: String

init() async throws {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid

if let user = Auth.auth().currentUser {
userID1 = user.uid
} else {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid
}
storage = Storage.storage()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ struct ImagenIntegrationTests {
var userID1: String

init() async throws {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid
if let user = Auth.auth().currentUser {
userID1 = user.uid
} else {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid
}

vertex = VertexAI.vertexAI()
storage = Storage.storage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ final class IntegrationTests: XCTestCase {
var userID1 = ""

override func setUp() async throws {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid
if let user = Auth.auth().currentUser {
userID1 = user.uid
} else {
let authResult = try await Auth.auth().signIn(
withEmail: Credentials.emailAddress1,
password: Credentials.emailPassword1
)
userID1 = authResult.user.uid
}

vertex = VertexAI.vertexAI()
model = vertex.generativeModel(
Expand Down
Loading