Skip to content

Fixing tests that leave traces (users)#18653

Closed
khalidmammadov wants to merge 15 commits intoapache:mainfrom
khalidmammadov:fix_test_user_creation_traces
Closed

Fixing tests that leave traces (users)#18653
khalidmammadov wants to merge 15 commits intoapache:mainfrom
khalidmammadov:fix_test_user_creation_traces

Conversation

@khalidmammadov
Copy link
Contributor

There are loads of test that leave traces e.g. don't delete users for example once their tests are complete.
This PR adds a new function and makes use of them in the test suite.

If PR accepted, I will file some more similar PR's to fix remaining test cases. This is deliberately scoped to keep changes to minimum.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Sep 30, 2021
@khalidmammadov
Copy link
Contributor Author

@potiuk can you please take a look?

dimberman and others added 6 commits September 30, 2021 12:33
Without adding the AWS region to the URL, SQLAlchemy engines created by
Airflow can't write dataframes to snowflake using pd_writer. This PR
fixes this.
The UI breaks when a search field sends a null datetime. This fixes it
* Remove sleep from retry delay test

* Change to use freezegun

* Approximate smallest timedelta without numpy

* Use pre-defined smallest timedelta

It turns out `datetime.datetime.resolution` is already defined as the smallest possible timedelta (one microsecond). Attempting to create a timedelta with microseconds in the interval (0.5, 1) simply results in microseconds being rounded up to 1.
ashb and others added 6 commits October 1, 2021 13:20
This pattern of having a local table of contents seems to have been
cargo-culted to all of the providers, and other pages, but our Sphinx
theme already has the lage contents on the right hand side -- this is
just leading to duplication.

(Not to mention that for the majority of cases the page is so short that
you can easily see everytine at once anyway.)

I have left it in a few places -- for instance the main
configurations-ref.rst I have kept it.
…pache#18655)

We currently show a nice error message when the trigger button is clicked
but clicking on trigger DAG w/conf for a dag that doesn't exist anymore,
takes us to enter configuration. When you eventually trigger, you get error
messages.

This PR fixes it
* Support all Unix wildcards in S3KeySensor

This addresses issue 15538 by expanding the regular expression to include all possible wildcard input to fnmatch

* Added tests for s3 and s3_key
@potiuk
Copy link
Member

potiuk commented Oct 3, 2021

Very good idea - it needs somet static check fixes after rebase, but I think it is a step in the right direction to get rid of the side-effects between tests.

Can you please rebase and fix the tests @khalidmammadov ?

@khalidmammadov
Copy link
Contributor Author

Thanks @potiuk, will do rebase and fixes.
Also, I had a bit of thought, now thinking to change it a bit, so create_user_scope inside a Class. Then it will allow us to instantiate it and call this func so it's yield also scoped. This will allow parallel runs of this suite. What do you think?

@khalidmammadov
Copy link
Contributor Author

Closing as it brought other changes after rebase...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.