-
Notifications
You must be signed in to change notification settings - Fork 72
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
Ensure Remote Console tickets aren't VimStrings #779
Ensure Remote Console tickets aren't VimStrings #779
Conversation
Working on a schema migration for this but binary_blob_parts#data is a binary not a string so my usual REGEXP_REPLACE is failing |
Can you add a spec for this or is it too complicated? |
Strange that travis didn't run on this PR. |
👍 yeah should be able to |
Oh yeah you're right |
efcdf57
to
b3a46d4
Compare
expect(ticket).to have_key(:ticket) | ||
expect(ticket[:ticket]).to match(/^[0-9\-A-Z]{40}$/) | ||
expect(ticket[:ticket].class.name).to eq("String") # Ensure that VimStrings aren't returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly clearer
expect(ticket[:ticket].class.name).to eq("String") # Ensure that VimStrings aren't returned | |
expect(ticket[:ticket]).to be_instance_of(String) # Ensure that VimStrings aren't returned |
Can't use be_a or be_kind_of because that would account for subclassing, but I believe be_instance_of ignores subclassing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah didn't do that because I thought VimString (subclass of String) might return true but looks like that isn't the case
b3a46d4
to
fc37e55
Compare
Backported to
|
Ensure Remote Console tickets aren't VimStrings (cherry picked from commit c031f88)
Backported to
|
Ensure Remote Console tickets aren't VimStrings (cherry picked from commit c031f88)
When openings a VMRC Console a MiqTask is created and
vm.remote_console_vmrc_acquire_ticket
is called on the queue.The ticket string returned by
vim.acquireCloneTicket
is aVimString
type. This then is saved in the task_results which throws an exception when loaded due toVMwareWebService/VimTypes
not being loaded in the webserver.The raw data looks like:
Data migration: ManageIQ/manageiq-schema#631
Fixes #778