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

Add end-to-end tests to our CI #5124

Merged
merged 5 commits into from
Nov 23, 2022
Merged

Add end-to-end tests to our CI #5124

merged 5 commits into from
Nov 23, 2022

Conversation

claucambra
Copy link
Collaborator

@claucambra claucambra commented Nov 2, 2022

Fix #4234

This PR adds end-to-end testing to our CI.

Specifically, it:

  1. Adds and sets up a real server to our Drone pipeline
  2. Adds a end to end testing utilities class that makes it easier to test with the server set up in the CI
  3. Adds a test checking the correct set-up of an account
  4. Adds a test checking file transfer (down-syncing an existing file, creating and uploading a new file, and deleting said created file)

Addresses #4234

@claucambra claucambra self-assigned this Nov 2, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

test/endtoendtestutils.h Outdated Show resolved Hide resolved
test/endtoendtestutils.h Outdated Show resolved Hide resolved
test/endtoendtestutils.h Outdated Show resolved Hide resolved
test/endtoendtestutils.h Outdated Show resolved Hide resolved
@claucambra claucambra force-pushed the feature/end-to-end-tests branch 5 times, most recently from ee8b033 to 243749e Compare November 2, 2022 21:03
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

test/teste2efiletransfer.cpp Show resolved Hide resolved
test/teste2eserversetup.cpp Show resolved Hide resolved
@claucambra claucambra force-pushed the feature/end-to-end-tests branch 8 times, most recently from 2a6f508 to b5d5a10 Compare November 4, 2022 17:57
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

test/endtoendtestutils.h Show resolved Hide resolved
test/endtoendtestutils.h Show resolved Hide resolved
test/endtoendtestutils.h Show resolved Hide resolved
test/endtoendtestutils.h Show resolved Hide resolved
Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

how would you run the tests locally on a dev setup ?

.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
test/endtoendtestutils.cpp Show resolved Hide resolved
test/teste2efiletransfer.cpp Show resolved Hide resolved
test/endtoendtestutils.cpp Outdated Show resolved Hide resolved
test/endtoendtestutils.cpp Outdated Show resolved Hide resolved
test/teste2efiletransfer.cpp Show resolved Hide resolved
test/teste2efiletransfer.cpp Show resolved Hide resolved
@claucambra
Copy link
Collaborator Author

how would you run the tests locally on a dev setup ?

You could either:

  • Set up drone locally
  • Pull the docker container from our docker-ci images and point endtoendtestutils.cpp to the address which the local docker sets up

@claucambra claucambra force-pushed the feature/end-to-end-tests branch 3 times, most recently from cff2b22 to 303b0d3 Compare November 10, 2022 12:23
@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Merging #5124 (30115b4) into master (ab8f0db) will decrease coverage by 0.23%.
The diff coverage is n/a.

❗ Current head 30115b4 differs from pull request most recent head dfcf976. Consider uploading reports for the commit dfcf976 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5124      +/-   ##
==========================================
- Coverage   57.80%   57.56%   -0.24%     
==========================================
  Files         138      138              
  Lines       17441    17399      -42     
==========================================
- Hits        10082    10016      -66     
- Misses       7359     7383      +24     
Impacted Files Coverage Δ
src/common/syncfilestatus.h 50.00% <0.00%> (-50.00%) ⬇️
src/libsync/vfs/cfapi/hydrationjob.cpp 52.38% <0.00%> (-3.71%) ⬇️
src/libsync/syncfileitem.cpp 94.91% <0.00%> (-3.39%) ⬇️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 83.00% <0.00%> (-2.38%) ⬇️
src/libsync/discovery.h 57.14% <0.00%> (-2.12%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 72.50% <0.00%> (-1.82%) ⬇️
src/libsync/propagatorjobs.cpp 73.23% <0.00%> (-1.77%) ⬇️
src/libsync/syncfileitem.h 39.65% <0.00%> (-1.73%) ⬇️
src/libsync/filesystem.cpp 73.11% <0.00%> (-1.08%) ⬇️
src/common/syncjournaldb.cpp 77.63% <0.00%> (-0.30%) ⬇️
... and 5 more

@sonarcloud
Copy link

sonarcloud bot commented Nov 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
@mgallien mgallien force-pushed the feature/end-to-end-tests branch from 30115b4 to dfcf976 Compare November 23, 2022 07:40
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5124-dfcf97654cbc8258779799d966275f76336bf423-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@claucambra claucambra merged commit 1e17fec into master Nov 23, 2022
@claucambra claucambra deleted the feature/end-to-end-tests branch November 23, 2022 12:24
@mgallien mgallien added this to the 3.7.0 milestone Nov 24, 2022
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.

Implement end to end tests with real server
3 participants