Skip to content

Commit a827105

Browse files
committed
Update TarReader::Entry#read expectations for ruby 3.2
In ruby 3.1 and earlier, reading from an empty tar entry would return nil. Now this is not the case, so update our expectations. We run this in the pipeline on a docker image with ruby 3.2, so also update the .ruby-version file in this repo. ref: ruby/ruby@65ca14e
1 parent 936d685 commit a827105

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1
1+
3.2

spec/integration/build/aws_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
apply_spec = JSON.parse(read_from_tgz(stemcell, 'apply_spec.yml'))
101101
expect(apply_spec['agent_commit']).to eq(@agent_commit)
102102

103-
expect(read_from_tgz(stemcell, 'image')).to be_nil
103+
expect(read_from_tgz(stemcell, 'image')).to be_empty
104104
expect(File.read(stemcell_sha)).to eq(Digest::SHA1.hexdigest(File.read(stemcell)))
105105

106106
# running task should create packer-output-ami.txt in AMIS_DIR
@@ -277,7 +277,7 @@
277277
apply_spec = JSON.parse(read_from_tgz(stemcell, 'apply_spec.yml'))
278278
expect(apply_spec['agent_commit']).to eq(@agent_commit)
279279

280-
expect(read_from_tgz(stemcell, 'image')).to be_nil
280+
expect(read_from_tgz(stemcell, 'image')).to be_empty
281281
expect(File.read(stemcell_sha)).to eq(Digest::SHA1.hexdigest(File.read(stemcell)))
282282
end
283283
end

spec/integration/build/azure_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
# expect(read_from_tgz(stemcell, 'updates.txt')).to eq('some-updates')
102102

103-
expect(read_from_tgz(stemcell, 'image')).to be_nil
103+
expect(read_from_tgz(stemcell, 'image')).to be_empty
104104
expect(File.read(stemcell_sha)).to eq(Digest::SHA1.hexdigest(File.read(stemcell)))
105105
end
106106
end

spec/integration/build/gcp_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
apply_spec = JSON.parse(read_from_tgz(stemcell, 'apply_spec.yml'))
7474
expect(apply_spec['agent_commit']).to eq(agent_commit)
7575

76-
expect(read_from_tgz(stemcell, 'image')).to be_nil
76+
expect(read_from_tgz(stemcell, 'image')).to be_empty
7777
end
7878
end
7979
end

0 commit comments

Comments
 (0)