From 67e3cdc068b09a4743be756d8b0cce847838228e Mon Sep 17 00:00:00 2001 From: carolyncole <1599081+carolyncole@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:33:10 -0400 Subject: [PATCH] Reverse the default for Mediaflux connection to connect to the local mediaflux first (#894) --- .circleci/config.yml | 4 ++-- README.md | 1 + config/mediaflux.yml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a1a94b891..38a2cb416 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,10 +65,10 @@ jobs: # wait for postgres and mediaflux - run: sleep 10 - run: bundle exec rake db:migrate RAILS_ENV=test - - run: bundle exec rake schema:create RAILS_ENV=test TEST_MEDIAFLUX_HOST='mflux-ci.lib.princeton.edu' + - run: MFLUX_CI=true bundle exec rake schema:create RAILS_ENV=test - run: name: Run Rspec - command: COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN bundle exec rspec --format progress --format RspecJunitFormatter -o /tmp/rspec/rspec.xml + command: MFLUX_CI=true COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN bundle exec rspec --format progress --format RspecJunitFormatter -o /tmp/rspec/rspec.xml - store_test_results: path: /tmp/rspec - store_artifacts: diff --git a/README.md b/README.md index 08785f7fb..46ba73744 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ The MediaFlux service documentation may be accessed using http://0.0.0.0.:8888/m - Fast: `bundle exec rspec spec` - Run in browser: `RUN_IN_BROWSER=true bundle exec rspec spec` +- Run connected to CI mediaflux instance: `MFLUX_CI=true bundle exec rspec spec` ### Starting the development server diff --git a/config/mediaflux.yml b/config/mediaflux.yml index 4d976c2bf..dd75aa18b 100644 --- a/config/mediaflux.yml +++ b/config/mediaflux.yml @@ -97,8 +97,8 @@ test: api_root_collection_namespace: '/td-test-001/test' api_root_collection: 'path=/td-test-001/test/tigerdata' api_transport: 'http' - api_host: <%= ENV["MFLUX_LOCAL"] ? "0.0.0.0" : 'mflux-ci.lib.princeton.edu' %> - api_port: <%= ENV["MFLUX_LOCAL"] ? "8888" : '80' %> + api_host: <%= ENV["MFLUX_CI"] ? "mflux-ci.lib.princeton.edu" : "0.0.0.0" %> + api_port: <%= ENV["MFLUX_CI"] ? "80" : "8888" %> # Alternate to test is still a test location api_alternate_root_ns: '/td-test-002/tigerdataNS'