diff options
author | Dan Callahan <d.callahan@f5.com> | 2024-02-27 15:15:42 +0000 |
---|---|---|
committer | Dan Callahan <d.callahan@f5.com> | 2024-02-27 15:15:42 +0000 |
commit | d76761901c4084bcdbc5a449e9bbb47d56b7093c (patch) | |
tree | b4b7b4e3d588b73a2adcc0094cab466d9194c679 /test/test_ruby_application.py | |
parent | c43629880472bba8d389dfb0b7ae6d883b0ba499 (diff) | |
parent | 088117008c9e8f397a58cc8d8070ce047beff12f (diff) | |
download | unit-1.32.0-1.tar.gz unit-1.32.0-1.tar.bz2 |
Merge tag '1.32.0' into branches/packaging1.32.0-1
Unit 1.32.0 release.
Diffstat (limited to 'test/test_ruby_application.py')
-rw-r--r-- | test/test_ruby_application.py | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py index 6f533b70..127b75b7 100644 --- a/test/test_ruby_application.py +++ b/test/test_ruby_application.py @@ -2,6 +2,7 @@ import re import subprocess import pytest + from unit.applications.lang.ruby import ApplicationRuby prerequisites = {'modules': {'ruby': 'all'}} @@ -91,7 +92,7 @@ def test_ruby_application_server_port(): client.load('server_port') assert ( - client.get()['headers']['Server-Port'] == '7080' + client.get()['headers']['Server-Port'] == '8080' ), 'Server-Port header' @@ -164,15 +165,6 @@ def test_ruby_application_input_each(): @pytest.mark.skip('not yet') -def test_ruby_application_input_rewind(): - client.load('input_rewind') - - body = '0123456789' - - assert client.post(body=body)['body'] == body, 'input rewind' - - -@pytest.mark.skip('not yet') def test_ruby_application_syntax_error(skip_alert): skip_alert( r'Failed to parse rack script', @@ -317,6 +309,26 @@ def test_ruby_application_header_status(): assert client.get()['status'] == 200, 'header status' +def test_ruby_application_header_array(): + client.load('header_array') + + assert client.get()['headers']['x-array'] == 'name=value; ; value; av' + + +def test_ruby_application_header_array_nil(): + client.load('header_array_nil') + + assert client.get()['status'] == 503 + + +def test_ruby_application_header_array_empty(): + client.load('header_array_empty') + + headers = client.get()['headers'] + assert 'x-array' in headers + assert headers['x-array'] == '' + + @pytest.mark.skip('not yet') def test_ruby_application_header_rack(): client.load('header_rack') @@ -324,6 +336,20 @@ def test_ruby_application_header_rack(): assert client.get()['status'] == 500, 'header rack' +@pytest.mark.skip('not yet') +def test_ruby_application_session(): + client.load('session') + + assert client.get()['status'] == 200 + + +@pytest.mark.skip('not yet') +def test_ruby_application_multipart(): + client.load('multipart') + + assert client.get()['status'] == 200 + + def test_ruby_application_body_empty(): client.load('body_empty') |