Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/tests/functional/logs/test_get_log_events.py
1567 views
1
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License"). You
4
# may not use this file except in compliance with the License. A copy of
5
# the License is located at
6
#
7
# http://aws.amazon.com/apache2.0/
8
#
9
# or in the "license" file accompanying this file. This file is
10
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
# ANY KIND, either express or implied. See the License for the specific
12
# language governing permissions and limitations under the License.
13
from awscli.testutils import BaseAWSCommandParamsTest
14
15
16
class TestGetLogEvents(BaseAWSCommandParamsTest):
17
prefix = 'logs get-log-events'
18
19
# TODO: Get rid of this test once we do the following:
20
# 1) Add support for pagination operations that return repeat next
21
# tokens to indicate that pagination has ended. Currently an
22
# error is thrown for this.
23
# 2) We add a pagination model for GetLogEvents
24
def test_cannot_paginate(self):
25
cmdline = self.prefix
26
cmdline += ' --log-group-name foo'
27
cmdline += ' --log-stream-name bar'
28
cmdline += ' --page-size 5'
29
stdout, stderr, rc = self.run_cmd(cmdline, expected_rc=255)
30
self.assertIn('Unknown options', stderr)
31
self.assertIn('--page-size', stderr)
32
33