[ 
https://issues.apache.org/jira/browse/TS-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14743863#comment-14743863
 ] 

ASF GitHub Bot commented on TS-3782:
------------------------------------

Github user ericcarlschwartz commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/277#discussion_r39420551
  
    --- Diff: ci/tsqa/tests/test_http2_spec.py ---
    @@ -0,0 +1,114 @@
    +#  Licensed to the Apache Software Foundation (ASF) under one
    +#  or more contributor license agreements.  See the NOTICE file
    +#  distributed with this work for additional information
    +#  regarding copyright ownership.  The ASF licenses this file
    +#  to you under the Apache License, Version 2.0 (the
    +#  "License"); you may not use this file except in compliance
    +#  with the License.  You may obtain a copy of the License at
    +#
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +#
    +#  Unless required by applicable law or agreed to in writing, software
    +#  distributed under the License is distributed on an "AS IS" BASIS,
    +#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +#  See the License for the specific language governing permissions and
    +#  limitations under the License.
    +
    +#
    +# Note: This test case uses h2spec. Please install it yourself.
    +# https://github.com/summerwind/h2spec
    +#
    +
    +import logging
    +import os
    +import subprocess
    +
    +import helpers
    +
    +import tsqa.endpoint
    +import tsqa.test_cases
    +import tsqa.utils
    +
    +log = logging.getLogger(__name__)
    +
    +# helper function to get h2spec path
    +def which(program):
    +    def is_exe(fpath):
    +        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
    +    fpath, fname = os.path.split(program)
    +    if fpath:
    +        if is_exe(program):
    +            return program
    +    else:
    +        for path in os.environ["PATH"].split(os.pathsep):
    +            path = path.strip('"')
    +            exe_file = os.path.join(path, program)
    +            if is_exe(exe_file):
    +                return exe_file
    +    return None
    +
    +class TestH2Spec(helpers.EnvironmentCase, tsqa.test_cases.HTTPBinCase):
    +    @classmethod
    +    def setUpEnv(cls, env):
    +        '''
    +        Setting up environment for testing of HTTP2
    +        '''
    +        # get path to h2spec
    +        cls.h2spec = which('h2spec')
    +        if cls.h2spec is None:
    +          raise helpers.unittest.SkipTest('Cannot find h2spec. skipping 
test.')
    --- End diff --
    
    @bcall it looks like it will just skip the test if h2spec isn't there. 
(that's what we do for the simple spdy tests)


> Add tests for HTTP/2 in TSQA
> ----------------------------
>
>                 Key: TS-3782
>                 URL: https://issues.apache.org/jira/browse/TS-3782
>             Project: Traffic Server
>          Issue Type: Test
>          Components: CI, HTTP/2
>            Reporter: Masaori Koshiba
>            Assignee: Thomas Jackson
>              Labels: review
>             Fix For: 6.1.0
>
>         Attachments: exceptional_scenario_tests_001.patch, 
> normal_scenario_tests_001.patch
>
>
> Add tests for HTTP/2 in TSQA. IMO, it is better to add two types of tests for 
> HTTP/2 below.
> 1. Normal Scenario Tests
>   - Do HTTP requests with [hyper|https://github.com/lukasa/hyper] or other 
> HTTP/2 client.
> 2. Exceptional Scenario Tests
>   - [h2spec|https://github.com/summerwind/h2spec] looks good test tool for 
> edge cases of HTTP/2.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to