Skip to content

[Vertex AI] Add integration test setup configs #14570

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
29 changes: 29 additions & 0 deletions FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift
Original file line number Diff line number Diff line change
@@ -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 = ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "866138572CC943DD00F4B78E"
BuildableName = "VertexAITestApp-SPM.app"
BlueprintName = "VertexAITestApp-SPM"
ReferencedContainer = "container:VertexAITestApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "866138682CC943DE00F4B78E"
BuildableName = "IntegrationTests-SPM.xctest"
BlueprintName = "IntegrationTests-SPM"
ReferencedContainer = "container:VertexAITestApp.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "866138572CC943DD00F4B78E"
BuildableName = "VertexAITestApp-SPM.app"
BlueprintName = "VertexAITestApp-SPM"
ReferencedContainer = "container:VertexAITestApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-FIRDebugEnabled"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
<EnvironmentVariables>
<EnvironmentVariable
key = "FIRAAppCheckDebugToken"
value = "https://valentine.corp.google.com/#/show/1717794662315980"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "VTXIntegrationImagen"
value = "true"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "866138572CC943DD00F4B78E"
BuildableName = "VertexAITestApp-SPM.app"
BlueprintName = "VertexAITestApp-SPM"
ReferencedContainer = "container:VertexAITestApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading