From a5d0a0e98a0ef9d558955802eafb7aeeaf4e1bfc Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 30 Sep 2024 15:36:03 -0400 Subject: [PATCH] fix test ci (#3832) Fix test ci by populating these test files so that the directory isn't empty. --- .github/workflows/tests.yml | 8 +++++--- apps/dashboard/test/system/files_test.rb | 10 +++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d12aebc0f5..fbfd1bfdc6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/apps/dashboard/test/system/files_test.rb b/apps/dashboard/test/system/files_test.rb index d7f4433152..0e92965d26 100644 --- a/apps/dashboard/test/system/files_test.rb +++ b/apps/dashboard/test/system/files_test.rb @@ -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