MushroomObserver / mushroom-observer

A website for sharing observations of mushrooms.
https://mushroomobserver.org
MIT License
78 stars 25 forks source link

Fix string comparison in deploy.sh #2268

Closed mo-nathan closed 2 months ago

mo-nathan commented 2 months ago

This should fix the reported error: script/deploy.sh: line 45: [: too many arguments

JoeCohen commented 2 months ago

Hmm. 3 CI system test failures. First time I've seen that. (They are identical in the push and pr tests.) Locally, one system test method fails consistently:

joe@Josephs-iMac mushroom-observer % rails t test/system/observation_form_system_test.rb:137
Started with run options --seed 9689

Capybara starting Puma...--=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=-
...
[Screenshot Image]: /Users/joe/mushroom-observer/tmp/capybara/failures_test_autofill_location_from_geotagged_image_nothing_matches.png
 FAIL ObservationFormSystemTest#test_autofill_location_from_geotagged_image_nothing_matches (11.08s)
        expected to find visible field "observation_place_name" that is not disabled with value "University Park, Miami-Dade Co., Florida, USA" but there were no matches. Also found "", which matched the selector but not all filters. Expected value to be "University Park, Miami-Dade Co., Florida, USA" but was "Falmouth, Sandwich, Barnstable Co., Massachusetts, USA"
        test/system/observation_form_system_test.rb:137:in `test_autofill_location_from_geotagged_image_nothing_matches'

  5/5: [========================================================================================================] 100% Time: 00:00:11, Time: 00:00:11

Finished in 11.08018s
1 tests, 24 assertions, 1 failures, 0 errors, 0 skips
nimmolo commented 2 months ago

@JoeCohen @mo-nathan For the test Joe's getting failures on, I'm pretty sure the test is correct and the wait time is reasonable.

I would try this instead of what's in line 132-3, or increase the wait time in 134. (Observation.recent_by_user is a recent scope I wrote for Observation that may be cached by the db, so... maybe faster?)

    last_obs = Observation.recent_by_user(User.current).last
nimmolo commented 2 months ago

Added those changes in #2270, will merge immediately