Skip to content

Commit

Permalink
Update test fakes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfeo committed Apr 21, 2023
1 parent 390c1e7 commit 7a262ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.gabrielfeo.gradle.enterprise.api

import com.gabrielfeo.gradle.enterprise.api.model.*
import kotlinx.coroutines.flow.MutableStateFlow
import retrofit2.http.Body

class FakeGradleEnterpriseApi(
val builds: List<Build>,
Expand Down Expand Up @@ -34,9 +35,7 @@ class FakeGradleEnterpriseApi(
}
checkNotNull(maxBuilds)
val first = builds.indexOfFirst { it.id == (fromBuild ?: sinceBuild) } + 1
return builds
.slice(first..builds.lastIndex)
.take(maxBuilds)
return builds.slice(first..builds.lastIndex).take(maxBuilds)
}

override suspend fun getGradleAttributes(
Expand All @@ -62,15 +61,19 @@ class FakeGradleEnterpriseApi(
TODO("Not yet implemented")
}

override suspend fun createTestDistributionAgentPool(testDistributionAgentPoolConfiguration: TestDistributionAgentPoolConfiguration): TestDistributionAgentPoolConfigurationWithId {
override suspend fun createTestDistributionAgentPool(
testDistributionAgentPoolConfiguration: TestDistributionAgentPoolConfiguration,
): TestDistributionAgentPoolConfigurationWithId {
TODO("Not yet implemented")
}

override suspend fun deleteTestDistributionAgentPool(poolId: String) {
TODO("Not yet implemented")
}

override suspend fun generateTestDistributionApiKey(): TestDistributionApiKey {
override suspend fun generateTestDistributionApiKey(
@Body testDistributionApiKeyDescription: TestDistributionApiKeyDescription?,
): TestDistributionApiKey {
TODO("Not yet implemented")
}

Expand Down
1 change: 1 addition & 0 deletions src/test/resources/gradle-attributes-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"continueOnFailureEnabled": false,
"daemonEnabled": true,
"dryRunEnabled": false,
"excludedTasks": [],
"fileSystemWatchingEnabled": true,
"maxNumberOfGradleWorkers": 12,
"offlineModeEnabled": false,
Expand Down

0 comments on commit 7a262ce

Please sign in to comment.