From 7d87848d0e2fbe0ad42fbe0aa1c4dd1747533b94 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 12 Mar 2025 18:45:21 -0400 Subject: [PATCH 1/3] Add shared `VertexAITestApp-SPM.xcscheme` --- .../xcschemes/VertexAITestApp-SPM.xcscheme | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme diff --git a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme new file mode 100644 index 00000000000..739535f8e30 --- /dev/null +++ b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 880eb1f15be600c6b130b35ea8290e0b41a2fb00 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 12 Mar 2025 19:05:33 -0400 Subject: [PATCH 2/3] Run Imagen integration tests when `VTXIntegrationImagen` is `true` --- .../TestApp/Tests/Integration/ImagenIntegrationTests.swift | 4 ++-- .../xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/ImagenIntegrationTests.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/ImagenIntegrationTests.swift index 5b2587743d4..779e8a295e7 100644 --- a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/ImagenIntegrationTests.swift +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/ImagenIntegrationTests.swift @@ -28,8 +28,8 @@ import VertexAITestApp @Suite( .enabled( - if: ProcessInfo.processInfo.environment["VTXIntegrationImagen"] != nil, - "Only runs if the environment variable VTXIntegrationImagen is set." + if: ProcessInfo.processInfo.environment["VTXIntegrationImagen"] == "true", + "Only runs if the environment variable VTXIntegrationImagen is set to true." ), .serialized ) diff --git a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme index 739535f8e30..fc4f57f1298 100644 --- a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme +++ b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme @@ -78,7 +78,7 @@ + isEnabled = "YES"> From 25c1ab7fd1bb9cbb24144c488a803bad5bd1cd59 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 12 Mar 2025 19:22:09 -0400 Subject: [PATCH 3/3] Add placeholder `Credentials.swift` file --- .../Tests/Integration/Credentials.swift | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift new file mode 100644 index 00000000000..ce9f3542c64 --- /dev/null +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift @@ -0,0 +1,29 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation + +// Copy the Google-internal file from: +// https://source.corp.google.com/piper///depot/google3/third_party/firebase/ios/Secrets/VertexAI/TestApp/Tests/Integration/Credentials.swift +// +// Alternatively, set up emails / passwords in Firebase Auth for a custom Firebase project. +enum Credentials { + // Auth User 1 + static let emailAddress1 = "" + static let emailPassword1 = "" + + // Auth User 2 + static let emailAddress2 = "" + static let emailPassword2 = "" +}