mirror of
https://github.com/apache/superset.git
synced 2026-05-09 09:55:19 +00:00
remove --max-fail 1 on integration tests to iterate faster
This commit is contained in:
@@ -33,4 +33,4 @@ superset load-test-users
|
||||
|
||||
echo "Running tests"
|
||||
|
||||
pytest --durations-min=2 --maxfail=1 --cov-report= --cov=superset ./tests/integration_tests "$@"
|
||||
pytest --durations-min=2 --cov-report= --cov=superset ./tests/integration_tests "$@"
|
||||
|
||||
@@ -1077,9 +1077,7 @@ class TestChartApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCase):
|
||||
"""
|
||||
self.login(GAMMA_USERNAME)
|
||||
chart_no_access = (
|
||||
db.session.query(Slice)
|
||||
.filter_by(slice_name="Girl Name Cloud")
|
||||
.one_or_none()
|
||||
db.session.query(Slice).filter_by(slice_name="Trends").one_or_none()
|
||||
)
|
||||
uri = f"api/v1/chart/{chart_no_access.id}"
|
||||
rv = self.client.get(uri)
|
||||
@@ -2062,7 +2060,7 @@ class TestChartApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCase):
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
def test_warm_up_cache_no_datasource(self) -> None:
|
||||
self.login(ADMIN_USERNAME)
|
||||
slc = self.get_slice("Top 10 Girl Name Share")
|
||||
slc = self.get_slice("Genders")
|
||||
|
||||
with mock.patch.object(
|
||||
Slice,
|
||||
|
||||
@@ -426,7 +426,7 @@ class TestChartWarmUpCacheCommand(SupersetTestCase):
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
@pytest.mark.skip(reason="This test will be changed to use the api/v1/data")
|
||||
def test_warm_up_cache(self):
|
||||
slc = self.get_slice("Top 10 Girl Name Share")
|
||||
slc = self.get_slice("Genders")
|
||||
result = ChartWarmUpCacheCommand(slc.id, None, None).run()
|
||||
assert result == {
|
||||
"chart_id": slc.id,
|
||||
|
||||
@@ -227,7 +227,7 @@ class TestCore(SupersetTestCase):
|
||||
def test_slice_data(self):
|
||||
# slice data should have some required attributes
|
||||
self.login(ADMIN_USERNAME)
|
||||
slc = self.get_slice(slice_name="Top 10 Girl Name Share")
|
||||
slc = self.get_slice(slice_name="Genders")
|
||||
slc_data_attributes = slc.data.keys()
|
||||
assert "changed_on" in slc_data_attributes
|
||||
assert "modified" in slc_data_attributes
|
||||
|
||||
@@ -1489,7 +1489,7 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
"alpha2", "password", "Alpha", email="alpha2@superset.org"
|
||||
)
|
||||
existing_slice = (
|
||||
db.session.query(Slice).filter_by(slice_name="Girl Name Cloud").first()
|
||||
db.session.query(Slice).filter_by(slice_name="Participants").first()
|
||||
)
|
||||
dashboard = self.insert_dashboard(
|
||||
"title", "slug1", [user_alpha1.id], slices=[existing_slice], published=True
|
||||
@@ -1515,7 +1515,7 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
"alpha2", "password", "Alpha", email="alpha2@superset.org"
|
||||
)
|
||||
existing_slice = (
|
||||
db.session.query(Slice).filter_by(slice_name="Girl Name Cloud").first()
|
||||
db.session.query(Slice).filter_by(slice_name="Participants").first()
|
||||
)
|
||||
|
||||
dashboard_count = 4
|
||||
@@ -1985,7 +1985,7 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
admin = self.get_user("admin")
|
||||
slices = []
|
||||
slices.append(db.session.query(Slice).filter_by(slice_name="Trends").one())
|
||||
slices.append(db.session.query(Slice).filter_by(slice_name="Boys").one())
|
||||
slices.append(db.session.query(Slice).filter_by(slice_name="Genders").one())
|
||||
|
||||
# Insert dashboard with admin as owner
|
||||
dashboard = self.insert_dashboard(
|
||||
@@ -2016,7 +2016,7 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
assert rv.status_code == 200
|
||||
|
||||
# Check that chart named Boys does not contain alpha 1 in its owners
|
||||
boys = db.session.query(Slice).filter_by(slice_name="Boys").one()
|
||||
boys = db.session.query(Slice).filter_by(slice_name="Genders").one()
|
||||
assert user_alpha1 not in boys.owners
|
||||
|
||||
# Revert owners on slice
|
||||
@@ -2223,7 +2223,7 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
"alpha2", "password", "Alpha", email="alpha2@superset.org"
|
||||
)
|
||||
existing_slice = (
|
||||
db.session.query(Slice).filter_by(slice_name="Girl Name Cloud").first()
|
||||
db.session.query(Slice).filter_by(slice_name="Participants").first()
|
||||
)
|
||||
dashboard = self.insert_dashboard(
|
||||
"title", "slug1", [user_alpha1.id], slices=[existing_slice], published=True
|
||||
|
||||
@@ -100,7 +100,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
|
||||
self.create_user_with_roles(username, [new_role], should_create_roles=True)
|
||||
slice = (
|
||||
db.session.query(Slice) # noqa: F405
|
||||
.filter_by(slice_name="Girl Name Cloud")
|
||||
.filter_by(slice_name="Participants")
|
||||
.one_or_none()
|
||||
)
|
||||
dashboard_to_access = create_dashboard_to_db(published=True, slices=[slice])
|
||||
@@ -141,7 +141,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
|
||||
|
||||
slice = (
|
||||
db.session.query(Slice) # noqa: F405
|
||||
.filter_by(slice_name="Girl Name Cloud")
|
||||
.filter_by(slice_name="Participants")
|
||||
.one_or_none()
|
||||
)
|
||||
dashboard = create_dashboard_to_db(published=True, slices=[slice])
|
||||
@@ -164,7 +164,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
|
||||
|
||||
slice = (
|
||||
db.session.query(Slice) # noqa: F405
|
||||
.filter_by(slice_name="Girl Name Cloud")
|
||||
.filter_by(slice_name="Participants")
|
||||
.one_or_none()
|
||||
)
|
||||
dashboard = create_dashboard_to_db(published=True, slices=[slice])
|
||||
@@ -192,7 +192,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
|
||||
|
||||
slice = (
|
||||
db.session.query(Slice) # noqa: F405
|
||||
.filter_by(slice_name="Girl Name Cloud")
|
||||
.filter_by(slice_name="Participants")
|
||||
.one_or_none()
|
||||
)
|
||||
dashboard_to_access = create_dashboard_to_db(published=True, slices=[slice])
|
||||
|
||||
Reference in New Issue
Block a user