Upgrade GitLab Workhorse to v3.6.0
This commit is contained in:
		
							parent
							
								
									9483cbab26
								
							
						
					
					
						commit
						11f882ca43
					
				| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
3.5.1
 | 
			
		||||
3.6.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
---
 | 
			
		||||
title: Upgrade GitLab Workhorse to v3.6.0
 | 
			
		||||
merge_request:
 | 
			
		||||
author:
 | 
			
		||||
type: other
 | 
			
		||||
| 
						 | 
				
			
			@ -161,6 +161,18 @@ module Gitlab
 | 
			
		|||
        ]
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def send_url(url, allow_redirects: false)
 | 
			
		||||
        params = {
 | 
			
		||||
          'URL' => url,
 | 
			
		||||
          'AllowRedirects' => allow_redirects
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [
 | 
			
		||||
          SEND_DATA_HEADER,
 | 
			
		||||
          "send-url:#{encode(params)}"
 | 
			
		||||
        ]
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def terminal_websocket(terminal)
 | 
			
		||||
        details = {
 | 
			
		||||
          'Terminal' => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -465,4 +465,21 @@ describe Gitlab::Workhorse do
 | 
			
		|||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe '.send_url' do
 | 
			
		||||
    let(:url) { 'http://example.com' }
 | 
			
		||||
 | 
			
		||||
    subject { described_class.send_url(url) }
 | 
			
		||||
 | 
			
		||||
    it 'sets the header correctly' do
 | 
			
		||||
      key, command, params = decode_workhorse_header(subject)
 | 
			
		||||
 | 
			
		||||
      expect(key).to eq("Gitlab-Workhorse-Send-Data")
 | 
			
		||||
      expect(command).to eq("send-url")
 | 
			
		||||
      expect(params).to eq({
 | 
			
		||||
        'URL' => url,
 | 
			
		||||
        'AllowRedirects' => false
 | 
			
		||||
      }.deep_stringify_keys)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue