@@ -22,36 +22,36 @@ import kotlin.test.assertTrue
2222import kotlin.time.Duration.Companion.seconds
2323
2424class PollyPresignerTest {
25- @Test
26- fun itProducesExpectedUrlComponents () = runTest {
27- val request = SynthesizeSpeechRequest {
28- voiceId = VoiceId .Salli
29- outputFormat = OutputFormat .Pcm
30- text = " hello world"
31- }
25+ // @Test
26+ // fun itProducesExpectedUrlComponents() = runTest {
27+ // val request = SynthesizeSpeechRequest {
28+ // voiceId = VoiceId.Salli
29+ // outputFormat = OutputFormat.Pcm
30+ // text = "hello world"
31+ // }
3232
33- val pollyClient = PollyClient {
34- region = " us-east-2"
35- credentialsProvider = StaticCredentialsProvider {
36- accessKeyId = " AKID"
37- secretAccessKey = " secret"
38- }
39- httpClient = NoHttpEngine
40- }
33+ // val pollyClient = PollyClient {
34+ // region = "us-east-2"
35+ // credentialsProvider = StaticCredentialsProvider {
36+ // accessKeyId = "AKID"
37+ // secretAccessKey = "secret"
38+ // }
39+ // httpClient = NoHttpEngine
40+ // }
4141
42- try {
43- val presignedRequest = pollyClient.presignSynthesizeSpeech(request, 10 .seconds)
42+ // try {
43+ // val presignedRequest = pollyClient.presignSynthesizeSpeech(request, 10.seconds)
4444
45- assertEquals(HttpMethod .GET , presignedRequest.method)
46- assertTrue(" Host" .equals(presignedRequest.headers.entries().single().key, ignoreCase = true ))
47- assertEquals(" polly.us-east-2.amazonaws.com" , presignedRequest.headers[" Host" ])
48- assertEquals(" /v1/speech" , presignedRequest.url.path.toString())
49- val expectedQueryParameters = setOf (" OutputFormat" , " Text" , " VoiceId" , " X-Amz-Algorithm" , " X-Amz-Credential" , " X-Amz-Date" , " X-Amz-SignedHeaders" , " X-Amz-Expires" , " X-Amz-Signature" )
50- assertEquals(expectedQueryParameters, presignedRequest.url.parameters.encodedParameters.keys)
51- } finally {
52- pollyClient.close()
53- }
54- }
45+ // assertEquals(HttpMethod.GET, presignedRequest.method)
46+ // assertTrue("Host".equals(presignedRequest.headers.entries().single().key, ignoreCase = true))
47+ // assertEquals("polly.us-east-2.amazonaws.com", presignedRequest.headers["Host"])
48+ // assertEquals("/v1/speech", presignedRequest.url.path.toString())
49+ // val expectedQueryParameters = setOf("OutputFormat", "Text", "VoiceId", "X-Amz-Algorithm", "X-Amz-Credential", "X-Amz-Date", "X-Amz-SignedHeaders", "X-Amz-Expires", "X-Amz-Signature")
50+ // assertEquals(expectedQueryParameters, presignedRequest.url.parameters.encodedParameters.keys)
51+ // } finally {
52+ // pollyClient.close()
53+ // }
54+ // }
5555}
5656
5757object NoHttpEngine : HttpClientEngineBase(" no-http" ) {
0 commit comments