Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add override for test groups #2335

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

joshlarson
Copy link
Contributor

@joshlarson joshlarson commented Dec 21, 2023


@joshlarson joshlarson requested a review from a team as a code owner December 21, 2023 23:22
Copy link

Coverage of commit 1d579b1

Summary coverage rate:
  lines......: 94.6% (3049 of 3223 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     20| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

end

def all_test_group_names(user) do
user = Skate.Repo.preload(user, :test_groups)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would eventually like for this to be just one query, but I wasn't convinced that that was necessary right now. Unless there's something about Ecto that I'm missing, this will run 2 queries, not like.. 20.

Copy link

Coverage of commit 26c9aa9

Summary coverage rate:
  lines......: 94.8% (3054 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

@joshlarson joshlarson force-pushed the jdl/feat/add-override-for-test-groups branch from 9a58295 to 769e464 Compare December 21, 2023 23:55
use Ecto.Migration

def change do
# excellent_migrations:safety-assured-for-this-file raw_sql_executed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just our luck - the first migration we write with excellent_migrations in place, and we basically have to ignore it 🤦

Copy link

Coverage of commit 769e464

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit 769e464

Summary coverage rate:
  lines......: 94.6% (3047 of 3222 lines)
  functions..: 72.9% (1243 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit 8ee2c9a

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link
Member

@lemald lemald left a comment

Choose a reason for hiding this comment

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

Okay done with a first pass review. I think the three things that need addressing are the default value of the column, the name of get_enabled, and the skipped test.

Copy link

Coverage of commit a88888e

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit a88888e

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit e915105

Summary coverage rate:
  lines......: 94.6% (3049 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit 13d7652

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link
Member

@lemald lemald left a comment

Choose a reason for hiding this comment

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

Looks good to me and I was playing around with it locally and everything seems to work as expected. 👍

@joshlarson joshlarson force-pushed the jdl/feat/add-override-for-test-groups branch 2 times, most recently from b11892b to e11f227 Compare December 22, 2023 16:04
@joshlarson joshlarson changed the base branch from main to jdl/feat/add-test-group-override-column December 22, 2023 16:04
Copy link

Coverage of commit e11f227

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Copy link

Coverage of commit e11f227

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

@joshlarson joshlarson force-pushed the jdl/feat/add-override-for-test-groups branch from e11f227 to f232a45 Compare December 22, 2023 16:29
Copy link

Coverage of commit f232a45

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

Base automatically changed from jdl/feat/add-test-group-override-column to main January 2, 2024 15:37
@joshlarson joshlarson force-pushed the jdl/feat/add-override-for-test-groups branch from f232a45 to 7f73299 Compare January 2, 2024 15:48
Copy link

github-actions bot commented Jan 2, 2024

Coverage of commit 7f73299

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

@joshlarson joshlarson merged commit 3372f5e into main Jan 2, 2024
9 checks passed
@joshlarson joshlarson deleted the jdl/feat/add-override-for-test-groups branch January 2, 2024 16:50
Copy link

github-actions bot commented Jan 2, 2024

Coverage of commit 8c10070

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/skate/settings/db/test_group.ex                             | 100%      3|85.7%     7|    -      0
  lib/skate/settings/test_group.ex                                | 100%     22|88.9%     9|    -      0
  lib/skate/settings/test_group_override.ex                       |66.7%      6| 100%     4|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/controllers/page_controller.ex                    | 100%     11|85.7%     7|    -      0
  lib/skate_web/controllers/test_group_controller.ex              | 100%     60|93.8%    16|    -      0
  lib/skate_web/router.ex                                         |98.1%     52|16.0%   119|    -      0

Download coverage report

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