Skip to content

Commit 1fd4b40

Browse files
author
holtkamp
committed
fix tests
1 parent e818f0f commit 1fd4b40

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

src/Service/CloudWatchLogs/tests/Integration/CloudWatchLogsClientTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,16 @@ public function testDescribeLogGroups(): void
5252
$client = $this->getClient();
5353

5454
$input = new DescribeLogGroupsRequest([
55-
'accountIdentifiers' => ['change me'],
56-
'logGroupNamePrefix' => 'change me',
57-
'logGroupNamePattern' => 'change me',
58-
'nextToken' => 'change me',
55+
'accountIdentifiers' => ['123456789012'],
56+
'logGroupNamePrefix' => 'searchForNamePrefix',
5957
'limit' => 1337,
6058
'includeLinkedAccounts' => false,
61-
'logGroupClass' => 'change me',
62-
'logGroupIdentifiers' => ['change me'],
6359
]);
6460
$result = $client->describeLogGroups($input);
6561

6662
$result->resolve();
67-
68-
// self::assertTODO(expected, $result->getLogGroups());
69-
self::assertSame('changeIt', $result->getNextToken());
63+
self::assertEquals(200, $result->info()['status']);
64+
self::assertInstanceOf(\Generator::class, $result->getLogGroups());
7065
}
7166

7267
public function testDescribeLogStreams(): void

src/Service/CloudWatchLogs/tests/Unit/Input/DescribeLogGroupsRequestTest.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,24 @@ public function testRequest(): void
2020
]);
2121

2222
// see https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html
23-
$expected = '
24-
POST / HTTP/1.0
25-
Content-Type: application/x-amz-json-1.1
26-
X-AMZ-TARGET: Logs_20140328.DescribeLogGroups
27-
Accept: application/json
28-
{
29-
"accountIdentifiers": [ "s123456789012" ],
30-
"includeLinkedAccounts": false,
31-
"limit": 1337,
32-
"logGroupClass": "STANDARD",
33-
"logGroupIdentifiers": [ "logGroupIdentifier1" ],
34-
"logGroupNamePattern": "my-log-group-pattern",
35-
"logGroupNamePrefix": "my-log-group",
36-
}
37-
';
23+
$expected = 'POST / HTTP/1.0
24+
Content-Type: application/x-amz-json-1.1
25+
X-AMZ-TARGET: Logs_20140328.DescribeLogGroups
26+
Accept: application/json
27+
28+
{
29+
"accountIdentifiers": [
30+
"123456789012"
31+
],
32+
"includeLinkedAccounts": false,
33+
"limit": 1337,
34+
"logGroupClass": "STANDARD",
35+
"logGroupIdentifiers": [
36+
"logGroupIdentifier1"
37+
],
38+
"logGroupNamePattern": "my-log-group-pattern",
39+
"logGroupNamePrefix": "my-log-group"
40+
}';
3841

3942
self::assertRequestEqualsHttpRequest($expected, $input->request());
4043
}

0 commit comments

Comments
 (0)