Skip to content

Commit

Permalink
Revert "Attempting to make requests to the mflux ci server instead of…
Browse files Browse the repository at this point in the history
… our local docker container"

This reverts commit 287c5b9.
  • Loading branch information
dependabot[bot] authored and JaymeeH committed Aug 9, 2024
1 parent 287c5b9 commit a6a5d17
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions app/models/mediaflux/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ def self.request_path
end

def self.uri
if Connection.host == "0.0.0.0"
URI("#{Connection.transport}://#{Connection.host}:#{Connection.port}/#{request_path}")
else
URI("#{Connection.transport}://#{Connection.host}/#{request_path}")
end
URI("#{Connection.transport}://#{Connection.host}:#{Connection.port}/#{request_path}")
end

# Constructs a new HTTP POST request for usage with the Mediaflux API
Expand Down Expand Up @@ -60,7 +56,6 @@ def initialize(file: nil, session_token: nil, http_client: nil, session_user: ni
# Resolves the HTTP request against the Mediaflux API
# @return [Net::HTTP]
def resolve
puts(Rails.configuration.mediaflux["api_host"])
@http_response = @http_client.request self.class.uri, http_request
end

Expand Down
2 changes: 1 addition & 1 deletion config/mediaflux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test:
api_root_collection_namespace: '/td-test-001/test'
api_root_collection: 'path=/td-test-001/test/tigerdata'
api_transport: 'http'
api_host: 'mflux-ci.lib.princeton.edu'
api_host: <%= ENV["TEST_MEDIAFLUX_HOST"] || '0.0.0.0' %>
api_port: <%= ENV["TEST_MEDIAFLUX_PORT"] || '8888' %>

# Alternate to test is still a test location
Expand Down
2 changes: 1 addition & 1 deletion spec/models/mediaflux/asset_exist_request_headers_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "rails_helper"

RSpec.describe Mediaflux::AssetExistRequest, type: :model, connect_to_mediaflux: true do
RSpec.describe Mediaflux::AssetExistRequest, type: :model, connect_to_mediaflux: false do
let(:user) { FactoryBot.create(:user) }
let(:namespace_root) { Rails.configuration.mediaflux["api_root_collection_namespace"] }

Expand Down
2 changes: 1 addition & 1 deletion spec/system/welcome_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
expect(page).to have_content "Log Out"
end

it "shows the Mediflux version on the home page for a logged in user" do
it "shows the Mediflux version on the home page for a logged in user", connect_to_mediaflux: true do
sign_in current_user
visit "/"
sleep(1)
Expand Down
2 changes: 1 addition & 1 deletion spec/views/mediaflux_infos/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "rails_helper"

RSpec.describe "mediaflux_info/index", type: :view, connect_to_mediaflux: true do
RSpec.describe "mediaflux_info/index", type: :view do
before(:each) do
assign(:mf_version, { version: "1001" })
end
Expand Down

0 comments on commit a6a5d17

Please sign in to comment.