-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Adds check for .aab format before querying apkDetails (#2189)
* Adds check for .aab format before querying apkDetails * PR fixes * Update test
- Loading branch information
Showing
6 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ftl.util | ||
|
||
import com.google.testing.Testing | ||
import com.google.testing.model.GoogleCloudStorage | ||
import com.google.testing.model.ResultStorage | ||
import com.google.testing.model.TestExecution | ||
import com.google.testing.model.TestMatrix | ||
import ftl.http.executeWithRetry | ||
import io.mockk.every | ||
import io.mockk.mockkStatic | ||
|
||
fun mockTestMatrices( | ||
vararg mocks: TestMatrix | ||
) { | ||
mockkStatic("ftl.http.ExecuteWithRetryKt") | ||
every { | ||
any<Testing.Projects.TestMatrices.Get>().executeWithRetry() | ||
} returnsMany listOf(*mocks) | ||
} | ||
|
||
fun getMockedTestMatrix() = TestMatrix().apply { | ||
state = "INVALID" | ||
testMatrixId = "matrix-12345" | ||
testExecutions = listOf( | ||
TestExecution().apply { | ||
resultStorage = ResultStorage().apply { | ||
googleCloudStorage = GoogleCloudStorage().apply { | ||
gcsPath = "any/Path" | ||
} | ||
} | ||
} | ||
) | ||
} |