Skip to content

Bump to the latest bjoern/Flask/Jinja2 for the Web UI#935

Merged
rdmark merged 1 commit intodevelopfrom
rdmark-bump-webui-python-libs
Oct 24, 2022
Merged

Bump to the latest bjoern/Flask/Jinja2 for the Web UI#935
rdmark merged 1 commit intodevelopfrom
rdmark-bump-webui-python-libs

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Oct 24, 2022

click/itsdangerous/MarkupSafe are implicit dependencies of the above so removing explicit requirements.

… are implicit dependencies of the above so removing explicit requirements.
@rdmark rdmark requested review from nucleogenic and removed request for akuker and erichelgeson October 24, 2022 04:20
@rdmark rdmark changed the title Bump to the latest bjoern/Flask/Jinja2 Bump to the latest bjoern/Flask/Jinja2 for the Web UI Oct 24, 2022
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Copy Markdown
Member

@nucleogenic nucleogenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a failing test... 🤔

test_set_log_level[critical] 

http_client = <requests.sessions.Session object at 0x7f954f29edd0>, level = 'critical'

    @pytest.mark.parametrize("level", ["trace", "debug", "info", "warn", "err", "critical", "off"])
    def test_set_log_level(http_client, level):
        response = http_client.post(
            "/logs/level",
            data={
                "level": level,
            },
        )
    
        import pprint
        pprint.pprint(response.json())
        response_data = response.json()
    
        assert response.status_code == 200
>       assert response_data["status"] == STATUS_SUCCESS
E       AssertionError: assert 'error' == 'success'
E         - success
E         + error

tests/api/test_settings.py:48: AssertionError
------------------------------------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------------------------------------
{'data': {},
 'messages': [{'category': 'error', 'message': 'Invalid log level critical'}],
 'status': 'error'}
-------------------------

@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Oct 24, 2022

@nucleogenic Interesting! Is 'critical' really a valid log level? From the man page:

       -L LOG_LEVEL
              Set the rascsi log level (trace, debug, info, warn, err, off).

@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Oct 24, 2022

@nucleogenic Mystery solved. The critical log level was removed in #915 -- I assume you recompiled rascsi before running these tests!

I have another branch in the works for adding some tests. How about I address this log level test there?

@rdmark rdmark requested a review from nucleogenic October 24, 2022 17:29
Copy link
Copy Markdown
Member

@nucleogenic nucleogenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha! Yep, no problem with that.

I'm rebuilding RaSCSI in Docker for most branches I pull down:

cd docker
docker compose build --no-cache --progress=plain
docker compose up
docker compose run pytest -v

@rdmark rdmark merged commit 1da3caf into develop Oct 24, 2022
@rdmark rdmark deleted the rdmark-bump-webui-python-libs branch October 24, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants