Skip to content

Commit 07e63ca

Browse files
committed
delete ut
1 parent c1474fe commit 07e63ca

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/QRegionProfileManagerTest.kt

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,7 @@ class QRegionProfileManagerTest {
124124
assertThat(cnt).isEqualTo(2)
125125
}
126126

127-
@Test
128-
fun `listProfiles will call each client to get profiles`() {
129-
val client = clientRule.create<CodeWhispererRuntimeClient>()
130-
val mockResponse: SdkIterable<Profile> = SdkIterable<Profile> {
131-
listOf(
132-
Profile.builder().profileName("FOO").arn("foo").build(),
133-
).toMutableList().iterator()
134-
}
135-
136-
val mockResponse2: SdkIterable<Profile> = SdkIterable<Profile> {
137-
listOf(
138-
Profile.builder().profileName("BAR").arn("bar").build(),
139-
).toMutableList().iterator()
140-
}
141-
142-
val iterable: ListAvailableProfilesIterable = mock {
143-
on { it.profiles() } doReturn mockResponse doReturn mockResponse2
144-
}
145-
146-
// TODO: not sure if we can mock client with different region different response?
147-
client.stub {
148-
onGeneric { listAvailableProfilesPaginator(any<Consumer<ListAvailableProfilesRequest.Builder>>()) } doReturn iterable
149-
}
150-
151-
val r = sut.listRegionProfiles(project)
152-
assertThat(r).hasSize(2)
153-
154-
assertThat(r).contains(QRegionProfile("FOO", "foo"))
155-
assertThat(r).contains(QRegionProfile("BAR", "bar"))
156-
}
127+
// TODO: Add two unit tests for listProfiles — one with cache hit, one without
157128

158129
@Test
159130
fun `validateProfile should cross validate selected profile with latest API response for current project and remove it if its not longer accessible`() {

0 commit comments

Comments
 (0)