Skip to content

Commit

Permalink
fix test ci (#3832)
Browse files Browse the repository at this point in the history
Fix test ci by populating these test files so that the directory isn't empty.
  • Loading branch information
johrstrom authored Sep 30, 2024
1 parent 40c7f13 commit a5d0a0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ jobs:
path: ~/vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-unit-gems-${{ hashFiles('apps/*/Gemfile.lock', 'Gemfile.lock') }}-1

- name: Setup os dependencies
run: |
sudo apt-get update
sudo apt-get install -y rclone libsqlite3-dev
- name: Setup Bundler
run: |
bundle config path ~/vendor/bundle
bundle install
gem install rake
- name: Setup rclone
run: sudo apt-get update && sudo apt-get install rclone

- name: Run unit tests
run: bundle exec rake test:unit

Expand Down
10 changes: 5 additions & 5 deletions apps/dashboard/test/system/files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,11 @@ def setup
dir_to_dl = "#{dir}/test_dir"
`mkdir -p #{dir_to_dl}/first_level_dir`
`mkdir #{dir_to_dl}/.first_level_hidden_dir`
`touch #{dir_to_dl}/real_file`
`touch #{dir_to_dl}/first_level_dir/.second_level_hidden_file`
`touch #{dir_to_dl}/first_level_dir/second_level_real_file`
`touch #{dir_to_dl}/.first_level_hidden_dir/.another_second_level_hidden_file`
`touch #{dir_to_dl}/.first_level_hidden_dir/another_second_level_real_file`
`echo 'abc123' > #{dir_to_dl}/real_file`
`echo 'abc123' > #{dir_to_dl}/first_level_dir/.second_level_hidden_file`
`echo 'abc123' > #{dir_to_dl}/first_level_dir/second_level_real_file`
`echo 'abc123' > #{dir_to_dl}/.first_level_hidden_dir/.another_second_level_hidden_file`
`echo 'abc123' > #{dir_to_dl}/.first_level_hidden_dir/another_second_level_real_file`

visit files_url(dir)
find('tbody a', exact_text: 'test_dir').ancestor('tr').click
Expand Down

0 comments on commit a5d0a0e

Please sign in to comment.