Skip to content

Commit daab8e3

Browse files
authored
Add FirebaseAuth test_spec (#3123)
1 parent 840ab65 commit daab8e3

File tree

14 files changed

+1302
-82
lines changed

14 files changed

+1302
-82
lines changed

.travis.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ jobs:
4343
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCore.podspec --use-libraries
4444
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCore.podspec --use-modular-headers
4545

46+
- stage: test
47+
env:
48+
- PROJECT=Auth PLATFORM=iOS METHOD=xcodebuild
49+
before_install:
50+
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
51+
script:
52+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=ios
53+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=tvos
54+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=macos
55+
# TODO (renkelvin) Uncomment next line when Auth backend is fixed to support the integration tests.
56+
# - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
57+
4658
- stage: test
4759
env:
4860
- PROJECT=InstanceID PLATFORM=iOS METHOD=pod-lib-lint
@@ -138,7 +150,6 @@ jobs:
138150
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
139151
script:
140152
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAnalyticsInterop.podspec
141-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec
142153
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuthInterop.podspec
143154
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec
144155
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInAppMessagingDisplay.podspec
@@ -161,11 +172,29 @@ jobs:
161172
before_install:
162173
- ./scripts/install_prereqs.sh
163174
script:
175+
# TODO investigate why macos tests hang for FirebaseAuth - keychain related?
176+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --use-libraries --platforms=ios,tvos
177+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --use-modular-headers --platforms=ios,tvos
178+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --use-libraries --platforms=macos --skip-tests
179+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --use-modular-headers --platforms=macos --skip-tests
180+
164181
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAnalyticsInterop.podspec --use-libraries
165-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuth.podspec --use-libraries
182+
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAnalyticsInterop.podspec --use-modular-headers
166183
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuthInterop.podspec --use-libraries
184+
- travis_retry ./scripts/pod_lib_lint.rb FirebaseAuthInterop.podspec --use-modular-headers
167185
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --use-libraries
186+
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --use-modular-headers
168187
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInAppMessagingDisplay.podspec --use-libraries
188+
- travis_retry ./scripts/pod_lib_lint.rb FirebaseInAppMessagingDisplay.podspec --use-modular-headers
189+
190+
# Split from previous stage to avoid overflowing 45 minute sub-job limit.
191+
- stage: test
192+
if: type = cron
193+
env:
194+
- PROJECT=Firebase PLATFORM=iOS METHOD=pod-lib-lint
195+
before_install:
196+
- ./scripts/install_prereqs.sh
197+
script:
169198
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --use-libraries --platforms=ios
170199
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --use-libraries --platforms=tvos
171200
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --use-libraries --platforms=macos

Example/Auth/AuthSample/AuthSample.xcodeproj/project.pbxproj

Lines changed: 796 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1020"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DE800AF322A2F87E00AC9A23"
18+
BuildableName = "AuthSample.app"
19+
BlueprintName = "AuthSample"
20+
ReferencedContainer = "container:AuthSample.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DE800B7022A5927C00AC9A23"
36+
BuildableName = "Auth_ApiTests.xctest"
37+
BlueprintName = "Auth_ApiTests"
38+
ReferencedContainer = "container:AuthSample.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
<TestableReference
42+
skipped = "NO">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "DE800B9422A5BD1800AC9A23"
46+
BuildableName = "Auth_E2eTests.xctest"
47+
BlueprintName = "Auth_E2eTests"
48+
ReferencedContainer = "container:AuthSample.xcodeproj">
49+
</BuildableReference>
50+
</TestableReference>
51+
</Testables>
52+
<MacroExpansion>
53+
<BuildableReference
54+
BuildableIdentifier = "primary"
55+
BlueprintIdentifier = "DE800AF322A2F87E00AC9A23"
56+
BuildableName = "AuthSample.app"
57+
BlueprintName = "AuthSample"
58+
ReferencedContainer = "container:AuthSample.xcodeproj">
59+
</BuildableReference>
60+
</MacroExpansion>
61+
<AdditionalOptions>
62+
</AdditionalOptions>
63+
</TestAction>
64+
<LaunchAction
65+
buildConfiguration = "Debug"
66+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
67+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
68+
launchStyle = "0"
69+
useCustomWorkingDirectory = "NO"
70+
ignoresPersistentStateOnLaunch = "NO"
71+
debugDocumentVersioning = "YES"
72+
debugServiceExtension = "internal"
73+
allowLocationSimulation = "YES">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "DE800AF322A2F87E00AC9A23"
79+
BuildableName = "AuthSample.app"
80+
BlueprintName = "AuthSample"
81+
ReferencedContainer = "container:AuthSample.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
84+
<AdditionalOptions>
85+
</AdditionalOptions>
86+
</LaunchAction>
87+
<ProfileAction
88+
buildConfiguration = "Release"
89+
shouldUseLaunchSchemeArgsEnv = "YES"
90+
savedToolIdentifier = ""
91+
useCustomWorkingDirectory = "NO"
92+
debugDocumentVersioning = "YES">
93+
<BuildableProductRunnable
94+
runnableDebuggingMode = "0">
95+
<BuildableReference
96+
BuildableIdentifier = "primary"
97+
BlueprintIdentifier = "DE800AF322A2F87E00AC9A23"
98+
BuildableName = "AuthSample.app"
99+
BlueprintName = "AuthSample"
100+
ReferencedContainer = "container:AuthSample.xcodeproj">
101+
</BuildableReference>
102+
</BuildableProductRunnable>
103+
</ProfileAction>
104+
<AnalyzeAction
105+
buildConfiguration = "Debug">
106+
</AnalyzeAction>
107+
<ArchiveAction
108+
buildConfiguration = "Release"
109+
revealArchiveInOrganizer = "YES">
110+
</ArchiveAction>
111+
</Scheme>
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1020"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "NO"
13+
buildForArchiving = "NO"
14+
buildForAnalyzing = "NO">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DE800B7022A5927C00AC9A23"
18+
BuildableName = "Auth_ApiTests.xctest"
19+
BlueprintName = "Auth_ApiTests"
20+
ReferencedContainer = "container:AuthSample.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DE800B7022A5927C00AC9A23"
36+
BuildableName = "Auth_ApiTests.xctest"
37+
BlueprintName = "Auth_ApiTests"
38+
ReferencedContainer = "container:AuthSample.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
44+
</TestAction>
45+
<LaunchAction
46+
buildConfiguration = "Debug"
47+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
48+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49+
launchStyle = "0"
50+
useCustomWorkingDirectory = "NO"
51+
ignoresPersistentStateOnLaunch = "NO"
52+
debugDocumentVersioning = "YES"
53+
debugServiceExtension = "internal"
54+
allowLocationSimulation = "YES">
55+
<MacroExpansion>
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "DE800B7022A5927C00AC9A23"
59+
BuildableName = "Auth_ApiTests.xctest"
60+
BlueprintName = "Auth_ApiTests"
61+
ReferencedContainer = "container:AuthSample.xcodeproj">
62+
</BuildableReference>
63+
</MacroExpansion>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<MacroExpansion>
74+
<BuildableReference
75+
BuildableIdentifier = "primary"
76+
BlueprintIdentifier = "DE800B7022A5927C00AC9A23"
77+
BuildableName = "Auth_ApiTests.xctest"
78+
BlueprintName = "Auth_ApiTests"
79+
ReferencedContainer = "container:AuthSample.xcodeproj">
80+
</BuildableReference>
81+
</MacroExpansion>
82+
</ProfileAction>
83+
<AnalyzeAction
84+
buildConfiguration = "Debug">
85+
</AnalyzeAction>
86+
<ArchiveAction
87+
buildConfiguration = "Release"
88+
revealArchiveInOrganizer = "YES">
89+
</ArchiveAction>
90+
</Scheme>
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1020"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "NO"
13+
buildForArchiving = "NO"
14+
buildForAnalyzing = "NO">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DE800B9422A5BD1800AC9A23"
18+
BuildableName = "Auth_E2eTests.xctest"
19+
BlueprintName = "Auth_E2eTests"
20+
ReferencedContainer = "container:AuthSample.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DE800B9422A5BD1800AC9A23"
36+
BuildableName = "Auth_E2eTests.xctest"
37+
BlueprintName = "Auth_E2eTests"
38+
ReferencedContainer = "container:AuthSample.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
44+
</TestAction>
45+
<LaunchAction
46+
buildConfiguration = "Debug"
47+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
48+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49+
launchStyle = "0"
50+
useCustomWorkingDirectory = "NO"
51+
ignoresPersistentStateOnLaunch = "NO"
52+
debugDocumentVersioning = "YES"
53+
debugServiceExtension = "internal"
54+
allowLocationSimulation = "YES">
55+
<MacroExpansion>
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "DE800B9422A5BD1800AC9A23"
59+
BuildableName = "Auth_E2eTests.xctest"
60+
BlueprintName = "Auth_E2eTests"
61+
ReferencedContainer = "container:AuthSample.xcodeproj">
62+
</BuildableReference>
63+
</MacroExpansion>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<MacroExpansion>
74+
<BuildableReference
75+
BuildableIdentifier = "primary"
76+
BlueprintIdentifier = "DE800B9422A5BD1800AC9A23"
77+
BuildableName = "Auth_E2eTests.xctest"
78+
BlueprintName = "Auth_E2eTests"
79+
ReferencedContainer = "container:AuthSample.xcodeproj">
80+
</BuildableReference>
81+
</MacroExpansion>
82+
</ProfileAction>
83+
<AnalyzeAction
84+
buildConfiguration = "Debug">
85+
</AnalyzeAction>
86+
<ArchiveAction
87+
buildConfiguration = "Release"
88+
revealArchiveInOrganizer = "YES">
89+
</ArchiveAction>
90+
</Scheme>

Example/Auth/AuthSample/Podfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Uncomment the next two lines for pre-release testing on internal repo
2+
#source 'sso://cpdc-internal/firebase'
3+
#source 'https://github.com/CocoaPods/Specs.git'
4+
5+
# Comment the following line to use the CocoaPods master repo instead.
6+
source 'https://cdn.jsdelivr.net/cocoa/'
7+
8+
use_frameworks!
9+
10+
target 'AuthSample' do
11+
platform :ios, '8.0'
12+
pod 'FirebaseCore', :path => '../../../'
13+
pod 'GoogleUtilities', :path => '../../../'
14+
pod 'FirebaseAuth', :path => '../../../', :testspecs => ['unit']
15+
pod 'FirebaseCore', :path => '../../../'
16+
pod 'FirebaseInstanceID', :path => '../../..'
17+
pod 'FBSDKLoginKit'
18+
pod 'GoogleSignIn'
19+
pod 'GTMSessionFetcher/Core'
20+
21+
target 'Auth_ApiTests' do
22+
inherit! :search_paths
23+
end
24+
25+
target 'Auth_E2eTests' do
26+
inherit! :search_paths
27+
pod 'EarlGrey'
28+
end
29+
end

0 commit comments

Comments
 (0)