Path: blob/develop/tests/functional/logs/test_get_log_events.py
1567 views
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.1#2# Licensed under the Apache License, Version 2.0 (the "License"). You3# may not use this file except in compliance with the License. A copy of4# the License is located at5#6# http://aws.amazon.com/apache2.0/7#8# or in the "license" file accompanying this file. This file is9# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF10# ANY KIND, either express or implied. See the License for the specific11# language governing permissions and limitations under the License.12from awscli.testutils import BaseAWSCommandParamsTest131415class TestGetLogEvents(BaseAWSCommandParamsTest):16prefix = 'logs get-log-events'1718# TODO: Get rid of this test once we do the following:19# 1) Add support for pagination operations that return repeat next20# tokens to indicate that pagination has ended. Currently an21# error is thrown for this.22# 2) We add a pagination model for GetLogEvents23def test_cannot_paginate(self):24cmdline = self.prefix25cmdline += ' --log-group-name foo'26cmdline += ' --log-stream-name bar'27cmdline += ' --page-size 5'28stdout, stderr, rc = self.run_cmd(cmdline, expected_rc=255)29self.assertIn('Unknown options', stderr)30self.assertIn('--page-size', stderr)313233