Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/services/versioned_files_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def versioned_files?
def update(version:, version_metadata:, cocina:, file_transfers: {})
VersionedFilesService::Lock.with_lock(@object) do
UpdateAction.new(version:, version_metadata:, cocina:, file_transfers:, object: @object).call
StacksLinkAction.new(version:, object: @object).call
end
end

Expand Down
59 changes: 0 additions & 59 deletions app/services/versioned_files_service/stacks_link_action.rb

This file was deleted.

6 changes: 2 additions & 4 deletions spec/requests/v1/publish_dro_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,16 @@
end

context 'when the object does not already exist' do
# rubocop:disable RSpec/ExpectActual
it 'creates the resource' do
put "/v1/purls/#{druid}",
params: request,
headers: { 'Content-Type' => 'application/json', 'Authorization' => "Bearer #{jwt}" }
expect(response).to be_created
expect(File).to exist('tmp/stacks/bc/123/df/4567/bc123df4567/versions/cocina.1.json')
expect(File).to exist('tmp/stacks/bc/123/df/4567/bc123df4567/versions/cocina.json')
expect('tmp/stacks/bc/123/df/4567/bc123df4567/content/3e25960a79dbc69b674cd4ec67a72c62').to link_to('tmp/stacks/bc/123/df/4567/file2.txt')
expect('tmp/stacks/bc/123/df/4567/bc123df4567/content/5997de4d5abb55f21f652aa61b8f3aaf').to link_to('tmp/stacks/bc/123/df/4567/files/file2.txt')
expect(File).to exist('tmp/stacks/bc/123/df/4567/bc123df4567/content/3e25960a79dbc69b674cd4ec67a72c62')
expect(File).to exist('tmp/stacks/bc/123/df/4567/bc123df4567/content/5997de4d5abb55f21f652aa61b8f3aaf')
end
# rubocop:enable RSpec/ExpectActual
end

context 'when the object already exists' do
Expand Down
210 changes: 0 additions & 210 deletions spec/services/versioned_files_service/stacks_link_action_spec.rb

This file was deleted.

14 changes: 2 additions & 12 deletions spec/services/versioned_files_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,9 @@
head: 1
)

# Symlinks to stacks filesystem
expect("#{stacks_object_path}/file2.txt").to link_to("#{content_path}/3e25960a79dbc69b674cd4ec67a72c62")
expect("#{stacks_object_path}/files/file2.txt").to link_to("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf")

# Hardlinks to globus filesystem
expect(File).to exist("#{globus_object_path}/file2.txt")
expect(File).to exist("#{globus_object_path}/files/file2.txt")
expect("#{content_path}/3e25960a79dbc69b674cd4ec67a72c62").to link_to "#{globus_object_path}/file2.txt"
expect("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf").to link_to "#{globus_object_path}/files/file2.txt"
end
end

Expand Down Expand Up @@ -379,12 +375,6 @@
},
head: 2
)

# Symlinks to stacks filesystem
expect(File.exist?("#{stacks_object_path}/file1.txt")).to be false
expect("#{stacks_object_path}/file2.txt").to link_to("#{content_path}/4f35960a79dbc69b674cd4ec67a72d73")
expect("#{stacks_object_path}/files/file2.txt").to link_to("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf")
expect("#{stacks_object_path}/file3.txt").to link_to("#{content_path}/6007de4d5abb55f21f652aa61b8f3bbg")
end
end

Expand Down