Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unsafe_load to load a test file with unpermitted classes #890

Merged
merged 1 commit into from
Nov 16, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def host_config_storage_device_stub(host)
storage_device_yml = vcr_cassettes_dir.join(*described_class.name.underscore.split("::"), "host_storageDevice.yml")
allow(host).to receive(:collect!)
.with("config.storageDevice.hostBusAdapter", "config.storageDevice.scsiLun", "config.storageDevice.scsiTopology.adapter")
.and_return(YAML.load_file(storage_device_yml))
.and_return(YAML.unsafe_load(File.read(storage_device_yml)))
end

def vm_power_off_object_update
Expand Down
2 changes: 1 addition & 1 deletion spec/workers/event_catcher/event_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
private

def load_event(event_name)
YAML.load_file(event_data_dir.join("#{event_name}.yml"))
YAML.unsafe_load(File.read(event_data_dir.join("#{event_name}.yml")))
end

def event_data_dir
Expand Down