Skip to content

Commit ec46097

Browse files
committed
Stop writing legacy links from content files
1 parent ba7e062 commit ec46097

File tree

5 files changed

+4
-286
lines changed

5 files changed

+4
-286
lines changed

app/services/versioned_files_service.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def versioned_files?
3030
def update(version:, version_metadata:, cocina:, file_transfers: {})
3131
VersionedFilesService::Lock.with_lock(@object) do
3232
UpdateAction.new(version:, version_metadata:, cocina:, file_transfers:, object: @object).call
33-
StacksLinkAction.new(version:, object: @object).call
3433
end
3534
end
3635

app/services/versioned_files_service/stacks_link_action.rb

Lines changed: 0 additions & 59 deletions
This file was deleted.

spec/requests/v1/publish_dro_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,16 @@
9090
end
9191

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

107105
context 'when the object already exists' do

spec/services/versioned_files_service/stacks_link_action_spec.rb

Lines changed: 0 additions & 210 deletions
This file was deleted.

spec/services/versioned_files_service_spec.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,9 @@
198198
head: 1
199199
)
200200

201-
# Symlinks to stacks filesystem
202-
expect("#{stacks_object_path}/file2.txt").to link_to("#{content_path}/3e25960a79dbc69b674cd4ec67a72c62")
203-
expect("#{stacks_object_path}/files/file2.txt").to link_to("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf")
204-
205201
# Hardlinks to globus filesystem
206-
expect(File).to exist("#{globus_object_path}/file2.txt")
207-
expect(File).to exist("#{globus_object_path}/files/file2.txt")
202+
expect("#{content_path}/3e25960a79dbc69b674cd4ec67a72c62").to link_to "#{globus_object_path}/file2.txt"
203+
expect("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf").to link_to "#{globus_object_path}/files/file2.txt"
208204
end
209205
end
210206

@@ -379,12 +375,6 @@
379375
},
380376
head: 2
381377
)
382-
383-
# Symlinks to stacks filesystem
384-
expect(File.exist?("#{stacks_object_path}/file1.txt")).to be false
385-
expect("#{stacks_object_path}/file2.txt").to link_to("#{content_path}/4f35960a79dbc69b674cd4ec67a72d73")
386-
expect("#{stacks_object_path}/files/file2.txt").to link_to("#{content_path}/5997de4d5abb55f21f652aa61b8f3aaf")
387-
expect("#{stacks_object_path}/file3.txt").to link_to("#{content_path}/6007de4d5abb55f21f652aa61b8f3bbg")
388378
end
389379
end
390380

0 commit comments

Comments
 (0)