Add tests for plume webserver #513

Samengevoegd
Plume_migration_agent heeft 9 commits samengevoegd van circleci naar master 5 jaren geleden
Eigenaar

Tests are done using Firefox (I might try to use Chrome too), Selenium and Python (there is no good crate to use Selenium on Rust, so it seemed like a reasonable choice).
Also add a feature test for routes that will be necessary for some tests, but should not be on a public server (like committing Tantivy's index on demand instead of every 30 minutes to make possible to test search page)

Tests are done using Firefox (I might try to use Chrome too), [Selenium](https://www.seleniumhq.org/projects/webdriver/) and Python (there is no good crate to use Selenium on Rust, so it seemed like a reasonable choice). Also add a feature `test` for routes that will be necessary for some tests, but should not be on a public server (like committing Tantivy's index on demand instead of every 30 minutes to make possible to test search page)
codecov[bot] reageerde 5 jaren geleden (Gemigreerd van github.com)

Codecov Report

Merging #513 into master will increase coverage by 4.84%.
The diff coverage is 80%.

@@            Coverage Diff             @@
##           master     #513      +/-   ##
==========================================
+ Coverage   24.64%   29.49%   +4.84%     
==========================================
  Files          65       66       +1     
  Lines        7120     7114       -6     
==========================================
+ Hits         1755     2098     +343     
+ Misses       5365     5016     -349
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/513?src=pr&el=h1) Report > Merging [#513](https://codecov.io/gh/Plume-org/Plume/pull/513?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/723d2c4600d2b8c9aabc9a26562553a02616f65d?src=pr&el=desc) will **increase** coverage by `4.84%`. > The diff coverage is `80%`. ```diff @@ Coverage Diff @@ ## master #513 +/- ## ========================================== + Coverage 24.64% 29.49% +4.84% ========================================== Files 65 66 +1 Lines 7120 7114 -6 ========================================== + Hits 1755 2098 +343 + Misses 5365 5016 -349 ```
elegaanz (Gemigreerd van github.com) beoordeeld 5 jaren geleden
elegaanz (Gemigreerd van github.com) reageerde 5 jaren geleden

Isn't there one of the two lines above that should be removed?

Isn't there one of the two lines above that should be removed?
elegaanz (Gemigreerd van github.com) reageerde 5 jaren geleden

Maybe you could add a comment telling what these parameters are, to make it easier to edit them in the future.

Maybe you could add a comment telling what these parameters are, to make it easier to edit them in the future.
trinity-1686a beoordeeld 5 jaren geleden
Poster
Eigenaar

gosh my config is so old I had MIGRATION_DIR in it (so I copied it), but I was missing the MIGRATION_DIRECTORY for diesel so I added it, but in fact MIGRATION_DIR is no longer used by us

gosh my config is so old I had MIGRATION_DIR in it (so I copied it), but I was missing the MIGRATION_DIRECTORY for diesel so I added it, but in fact MIGRATION_DIR is no longer used by us
trinity-1686a beoordeeld 5 jaren geleden
Poster
Eigenaar

I think I'll change this to a copy statement, it will make more sense

I think I'll change this to a copy statement, it will make more sense
elegaanz (Gemigreerd van github.com) beoordeeld 5 jaren geleden
elegaanz (Gemigreerd van github.com) heeft een reactie achtergelaten

Looks good, excepted from run_browser_test.sh that I don't understand. 😄

Looks good, excepted from `run_browser_test.sh` that I don't understand. :smile:
@ -0,0 +5,4 @@
mkdir -p "target/cov/plume"
mkdir -p "target/cov/plm"
plm='kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov/plm plm'
elegaanz (Gemigreerd van github.com) reageerde 5 jaren geleden

I'm not sure to understand what you are doing here… 🤔

I'm not sure to understand what you are doing here… :thinking:
trinity-1686a beoordeeld 5 jaren geleden
@ -0,0 +5,4 @@
mkdir -p "target/cov/plume"
mkdir -p "target/cov/plm"
plm='kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov/plm plm'
Poster
Eigenaar

I'm creating a "shortcut" to plm run with kcov because I run it multiple time in the following lines, and it's rather long. So when I call $plm <something> after, it just mean "run plm <something> with coverage report"

I'm creating a "shortcut" to plm run with kcov because I run it multiple time in the following lines, and it's rather long. So when I call `$plm <something>` after, it just mean "run `plm <something>` with coverage report"
elegaanz (Gemigreerd van github.com) beoordeeld 5 jaren geleden
@ -0,0 +5,4 @@
mkdir -p "target/cov/plume"
mkdir -p "target/cov/plm"
plm='kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov/plm plm'
elegaanz (Gemigreerd van github.com) reageerde 5 jaren geleden

Oh OK, I get it, it is to get coverage for plm too. Great!

Oh OK, I get it, it is to get coverage for plm too. Great!
elegaanz (Gemigreerd van github.com) heeft deze veranderingen 5 jaren geleden goedgekeurd
elegaanz (Gemigreerd van github.com) heeft een reactie achtergelaten

👍

:+1:
igalic (Gemigreerd van github.com) heeft deze veranderingen 5 jaren geleden goedgekeurd
igalic (Gemigreerd van github.com) heeft een reactie achtergelaten

👍

👍
De pull request is samengevoegd als eabe73ddc0.
Je kunt ook command line instructies bekijken.

Stap 1:

Vanuit het project, check een branch uit en test de veranderingen.
git checkout -b circleci master
git pull origin circleci

Stap 2:

Voeg de wijzigingen samen en update ze op Forgejo.
git checkout master
git merge --no-ff circleci
git push origin master
Log in om deel te nemen aan deze discussie.
Geen beoordelaars
Geen mijlpaal
Niet toegewezen
2 deelnemers
Notificaties
Vervaldatum
De deadline is ongeldig of buiten bereik. Gebruik het formaat 'jjjj-mm-dd'.

Geen vervaldatum ingesteld.

Afhankelijkheden

Geen afhankelijkheden ingesteld.

Referentie: Plume/Plume#513
Laden…
Er is nog geen inhoud.