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

test: Test against file system #128

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

AndrewSisley
Copy link
Contributor

@AndrewSisley AndrewSisley commented Jan 19, 2022

Closes #127

Todo:

  • Set environment variable DEFRA_BADGER_FILE to non-default value for CI tests

@AndrewSisley AndrewSisley added the area/testing Related to any test or testing suite label Jan 19, 2022
@AndrewSisley AndrewSisley self-assigned this Jan 19, 2022
@AndrewSisley AndrewSisley changed the base branch from develop to sisley/test/I87-add-test-datastore-selection January 19, 2022 16:36
@AndrewSisley AndrewSisley changed the base branch from sisley/test/I87-add-test-datastore-selection to develop January 19, 2022 16:37
@AndrewSisley AndrewSisley force-pushed the sisley/test/I127-test-against-file-system branch from d145736 to c4c0a17 Compare January 19, 2022 21:59
@AndrewSisley
Copy link
Contributor Author

Spoke over discord some things were agreed:

  1. file based tests to be off by default (not just for performance, but not all dev environments can access file system in suitable manner)
  2. have a look at using the test.tempDir functionality and maybe randomly generate sub-dir names (to remove/reduce need to run in serial
  3. have a look at using go.test startup/teardown functions for cleanup (might not be suitable if each test has to actively do stuff for it)

@AndrewSisley AndrewSisley force-pushed the sisley/test/I127-test-against-file-system branch 3 times, most recently from 35d79d1 to 691b3c2 Compare January 20, 2022 15:13
@codecov
Copy link

codecov bot commented Jan 20, 2022

Codecov Report

Merging #128 (0a6528d) into develop (746aec2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #128   +/-   ##
========================================
  Coverage    54.09%   54.09%           
========================================
  Files           35       35           
  Lines         3629     3629           
========================================
  Hits          1963     1963           
  Misses        1437     1437           
  Partials       229      229           
Impacted Files Coverage Δ
query/graphql/schema/relations.go 54.63% <0.00%> (ø)

@AndrewSisley AndrewSisley force-pushed the sisley/test/I127-test-against-file-system branch 2 times, most recently from 411f55b to fb489fd Compare January 20, 2022 15:27
@AndrewSisley
Copy link
Contributor Author

Was way easier to do this than I expected - t.TempDir is super handy to have (it also handles teardown and provides a unique dir per test) :)

@AndrewSisley AndrewSisley marked this pull request as ready for review January 20, 2022 15:28
Is off by default, should be toggled on for the CI builds though
Copy link
Member

@jsimnz jsimnz left a comment

Choose a reason for hiding this comment

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

ezpz. LGTM

@AndrewSisley AndrewSisley merged commit bbb556b into develop Jan 27, 2022
@AndrewSisley AndrewSisley deleted the sisley/test/I127-test-against-file-system branch January 27, 2022 12:38
@orpheuslummis orpheuslummis mentioned this pull request Jan 29, 2022
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…ourcenetwork#128)

Is off by default, should be toggled on for the CI builds though
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to any test or testing suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup automated tests against file system
2 participants