Skip to content

Independent test runs#289

Open
DanChov wants to merge 11 commits intomasterfrom
independent_test_runs
Open

Independent test runs#289
DanChov wants to merge 11 commits intomasterfrom
independent_test_runs

Conversation

@DanChov
Copy link
Contributor

@DanChov DanChov commented Feb 2, 2026

Made test independent createting new user and workspace everytime they run and deleting them afterwards
#272

@DanChov DanChov closed this Feb 2, 2026
@DanChov DanChov reopened this Feb 2, 2026
@DanChov DanChov assigned DanChov and unassigned MarcelGeo and harminius Feb 3, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22061374321

Details

  • 231 of 242 (95.45%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 82.318%

Changes Missing Coverage Covered Lines Changed/Added Lines %
mergin/test/test_client.py 231 242 95.45%
Files with Coverage Reduction New Missed Lines %
mergin/test/test_client.py 3 97.66%
mergin/client.py 4 87.94%
Totals Coverage Status
Change from base Build 21135416399: -0.06%
Covered Lines: 4255
Relevant Lines: 5169

💛 - Coveralls

json_headers = {"Content-Type": "application/json"}


def get_default_overrides():
Copy link
Contributor

Choose a reason for hiding this comment

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

seems more like a constant

return {"storage": storage, "projects": 2, "api_allowed": True}


def teardown(mc: MerginClient, client_workspace_id):
Copy link
Contributor

Choose a reason for hiding this comment

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

add some docstring so it is clear what this teardown is supposed to do (e.g. I would expect user delete with such name)

else: # if user is not provided we create one
# user emial is generated with random
user = f"apitest_{create_random_suffix()}@example.com"
password = "testpass123"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should keep PWD secret or randomly generated

break
client_workspace_id = client_workspace["id"]
client_workspace_storage = client_workspace["storage"]
def mc2():
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems pretty much the same as mc(), can we reuse it?

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.

5 participants

Comments