pulp_deb_client 2.0.0b2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +163 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentGenericContentsApi.md +194 -0
- data/docs/ContentInstallerFileIndexApi.md +186 -0
- data/docs/ContentInstallerPackagesApi.md +194 -0
- data/docs/ContentPackageIndexApi.md +186 -0
- data/docs/ContentPackagesApi.md +194 -0
- data/docs/ContentReleasesApi.md +186 -0
- data/docs/DebDistribution.md +29 -0
- data/docs/DebPublication.md +31 -0
- data/docs/DebRemote.md +57 -0
- data/docs/DistributionsAptApi.md +358 -0
- data/docs/GenericContent.md +41 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/InlineResponse2006.md +23 -0
- data/docs/InlineResponse2007.md +23 -0
- data/docs/InlineResponse2008.md +23 -0
- data/docs/InlineResponse2009.md +23 -0
- data/docs/InstallerFileIndex.md +31 -0
- data/docs/InstallerPackage.md +99 -0
- data/docs/Package.md +99 -0
- data/docs/PackageIndex.md +31 -0
- data/docs/PublicationsAptApi.md +235 -0
- data/docs/PublicationsVerbatimApi.md +235 -0
- data/docs/Release.md +31 -0
- data/docs/RemotesAptApi.md +417 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/VerbatimPublication.md +27 -0
- data/git_push.sh +58 -0
- data/lib/pulp_deb_client/api/content_generic_contents_api.rb +239 -0
- data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +225 -0
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +235 -0
- data/lib/pulp_deb_client/api/content_package_index_api.rb +225 -0
- data/lib/pulp_deb_client/api/content_packages_api.rb +235 -0
- data/lib/pulp_deb_client/api/content_releases_api.rb +225 -0
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +436 -0
- data/lib/pulp_deb_client/api/publications_apt_api.rb +279 -0
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +279 -0
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +510 -0
- data/lib/pulp_deb_client/api_client.rb +402 -0
- data/lib/pulp_deb_client/api_error.rb +57 -0
- data/lib/pulp_deb_client/configuration.rb +243 -0
- data/lib/pulp_deb_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_deb_client/models/deb_distribution.rb +337 -0
- data/lib/pulp_deb_client/models/deb_publication.rb +282 -0
- data/lib/pulp_deb_client/models/deb_remote.rb +653 -0
- data/lib/pulp_deb_client/models/generic_content.rb +444 -0
- data/lib/pulp_deb_client/models/inline_response200.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2005.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2006.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2007.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2008.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2009.rb +235 -0
- data/lib/pulp_deb_client/models/installer_file_index.rb +355 -0
- data/lib/pulp_deb_client/models/installer_package.rb +1101 -0
- data/lib/pulp_deb_client/models/package.rb +1101 -0
- data/lib/pulp_deb_client/models/package_index.rb +355 -0
- data/lib/pulp_deb_client/models/release.rb +356 -0
- data/lib/pulp_deb_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_deb_client/models/verbatim_publication.rb +258 -0
- data/lib/pulp_deb_client/version.rb +15 -0
- data/lib/pulp_deb_client.rb +71 -0
- data/pulp_deb_client.gemspec +39 -0
- data/spec/api/content_generic_contents_api_spec.rb +80 -0
- data/spec/api/content_installer_file_index_api_spec.rb +77 -0
- data/spec/api/content_installer_packages_api_spec.rb +80 -0
- data/spec/api/content_package_index_api_spec.rb +77 -0
- data/spec/api/content_packages_api_spec.rb +80 -0
- data/spec/api/content_releases_api_spec.rb +77 -0
- data/spec/api/distributions_apt_api_spec.rb +118 -0
- data/spec/api/publications_apt_api_spec.rb +87 -0
- data/spec/api/publications_verbatim_api_spec.rb +87 -0
- data/spec/api/remotes_apt_api_spec.rb +132 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/deb_distribution_spec.rb +77 -0
- data/spec/models/deb_publication_spec.rb +83 -0
- data/spec/models/deb_remote_spec.rb +165 -0
- data/spec/models/generic_content_spec.rb +113 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response2006_spec.rb +59 -0
- data/spec/models/inline_response2007_spec.rb +59 -0
- data/spec/models/inline_response2008_spec.rb +59 -0
- data/spec/models/inline_response2009_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/installer_file_index_spec.rb +83 -0
- data/spec/models/installer_package_spec.rb +287 -0
- data/spec/models/package_index_spec.rb +83 -0
- data/spec/models/package_spec.rb +287 -0
- data/spec/models/release_spec.rb +83 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/verbatim_publication_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +242 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for PulpDebClient::RemotesAptApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'RemotesAptApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = PulpDebClient::RemotesAptApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of RemotesAptApi' do
|
|
30
|
+
it 'should create an instance of RemotesAptApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(PulpDebClient::RemotesAptApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create
|
|
36
|
+
# Create a deb remote
|
|
37
|
+
# A ViewSet for DebRemote.
|
|
38
|
+
# @param data
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [DebRemote]
|
|
41
|
+
describe 'create test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for delete
|
|
48
|
+
# Delete a deb remote
|
|
49
|
+
# Trigger an asynchronous delete task
|
|
50
|
+
# @param deb_remote_href URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [AsyncOperationResponse]
|
|
53
|
+
describe 'delete test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for list
|
|
60
|
+
# List deb remotes
|
|
61
|
+
# A ViewSet for DebRemote.
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @option opts [String] :name
|
|
64
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
65
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
|
66
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
|
67
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
|
68
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
|
69
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
|
70
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
|
71
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
72
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
73
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
74
|
+
# @return [InlineResponse2009]
|
|
75
|
+
describe 'list test' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# unit tests for partial_update
|
|
82
|
+
# Partially update a deb remote
|
|
83
|
+
# Trigger an asynchronous partial update task
|
|
84
|
+
# @param deb_remote_href URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
85
|
+
# @param data
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [AsyncOperationResponse]
|
|
88
|
+
describe 'partial_update test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for read
|
|
95
|
+
# Inspect a deb remote
|
|
96
|
+
# A ViewSet for DebRemote.
|
|
97
|
+
# @param deb_remote_href URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
100
|
+
# @return [DebRemote]
|
|
101
|
+
describe 'read test' do
|
|
102
|
+
it 'should work' do
|
|
103
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# unit tests for sync
|
|
108
|
+
# Trigger an asynchronous task to sync content
|
|
109
|
+
# @param deb_remote_href URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
110
|
+
# @param data
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [AsyncOperationResponse]
|
|
113
|
+
describe 'sync test' do
|
|
114
|
+
it 'should work' do
|
|
115
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# unit tests for update
|
|
120
|
+
# Update a deb remote
|
|
121
|
+
# Trigger an asynchronous update task
|
|
122
|
+
# @param deb_remote_href URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
123
|
+
# @param data
|
|
124
|
+
# @param [Hash] opts the optional parameters
|
|
125
|
+
# @return [AsyncOperationResponse]
|
|
126
|
+
describe 'update test' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
|
|
15
|
+
describe PulpDebClient::ApiClient do
|
|
16
|
+
context 'initialization' do
|
|
17
|
+
context 'URL stuff' do
|
|
18
|
+
context 'host' do
|
|
19
|
+
it 'removes http from host' do
|
|
20
|
+
PulpDebClient.configure { |c| c.host = 'http://example.com' }
|
|
21
|
+
expect(PulpDebClient::Configuration.default.host).to eq('example.com')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'removes https from host' do
|
|
25
|
+
PulpDebClient.configure { |c| c.host = 'https://wookiee.com' }
|
|
26
|
+
expect(PulpDebClient::ApiClient.default.config.host).to eq('wookiee.com')
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'removes trailing path from host' do
|
|
30
|
+
PulpDebClient.configure { |c| c.host = 'hobo.com/v4' }
|
|
31
|
+
expect(PulpDebClient::Configuration.default.host).to eq('hobo.com')
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
context 'base_path' do
|
|
36
|
+
it "prepends a slash to base_path" do
|
|
37
|
+
PulpDebClient.configure { |c| c.base_path = 'v4/dog' }
|
|
38
|
+
expect(PulpDebClient::Configuration.default.base_path).to eq('/v4/dog')
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "doesn't prepend a slash if one is already there" do
|
|
42
|
+
PulpDebClient.configure { |c| c.base_path = '/v4/dog' }
|
|
43
|
+
expect(PulpDebClient::Configuration.default.base_path).to eq('/v4/dog')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it "ends up as a blank string if nil" do
|
|
47
|
+
PulpDebClient.configure { |c| c.base_path = nil }
|
|
48
|
+
expect(PulpDebClient::Configuration.default.base_path).to eq('')
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe '#deserialize' do
|
|
55
|
+
it "handles Array<Integer>" do
|
|
56
|
+
api_client = PulpDebClient::ApiClient.new
|
|
57
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
58
|
+
response = double('response', headers: headers, body: '[12, 34]')
|
|
59
|
+
data = api_client.deserialize(response, 'Array<Integer>')
|
|
60
|
+
expect(data).to be_instance_of(Array)
|
|
61
|
+
expect(data).to eq([12, 34])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
it 'handles Array<Array<Integer>>' do
|
|
65
|
+
api_client = PulpDebClient::ApiClient.new
|
|
66
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
67
|
+
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
|
68
|
+
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
|
69
|
+
expect(data).to be_instance_of(Array)
|
|
70
|
+
expect(data).to eq([[12, 34], [56]])
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
it 'handles Hash<String, String>' do
|
|
74
|
+
api_client = PulpDebClient::ApiClient.new
|
|
75
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
76
|
+
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
|
77
|
+
data = api_client.deserialize(response, 'Hash<String, String>')
|
|
78
|
+
expect(data).to be_instance_of(Hash)
|
|
79
|
+
expect(data).to eq(:message => 'Hello')
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
describe "#object_to_hash" do
|
|
84
|
+
it 'ignores nils and includes empty arrays' do
|
|
85
|
+
# uncomment below to test object_to_hash for model
|
|
86
|
+
# api_client = PulpDebClient::ApiClient.new
|
|
87
|
+
# _model = PulpDebClient::ModelName.new
|
|
88
|
+
# update the model attribute below
|
|
89
|
+
# _model.id = 1
|
|
90
|
+
# update the expected value (hash) below
|
|
91
|
+
# expected = {id: 1, name: '', tags: []}
|
|
92
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
describe '#build_collection_param' do
|
|
97
|
+
let(:param) { ['aa', 'bb', 'cc'] }
|
|
98
|
+
let(:api_client) { PulpDebClient::ApiClient.new }
|
|
99
|
+
|
|
100
|
+
it 'works for csv' do
|
|
101
|
+
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
it 'works for ssv' do
|
|
105
|
+
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
it 'works for tsv' do
|
|
109
|
+
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
it 'works for pipes' do
|
|
113
|
+
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it 'works for multi' do
|
|
117
|
+
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
it 'fails for invalid collection format' do
|
|
121
|
+
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
describe '#json_mime?' do
|
|
126
|
+
let(:api_client) { PulpDebClient::ApiClient.new }
|
|
127
|
+
|
|
128
|
+
it 'works' do
|
|
129
|
+
expect(api_client.json_mime?(nil)).to eq false
|
|
130
|
+
expect(api_client.json_mime?('')).to eq false
|
|
131
|
+
|
|
132
|
+
expect(api_client.json_mime?('application/json')).to eq true
|
|
133
|
+
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
|
134
|
+
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
|
135
|
+
|
|
136
|
+
expect(api_client.json_mime?('application/xml')).to eq false
|
|
137
|
+
expect(api_client.json_mime?('text/plain')).to eq false
|
|
138
|
+
expect(api_client.json_mime?('application/jsonp')).to eq false
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
describe '#select_header_accept' do
|
|
143
|
+
let(:api_client) { PulpDebClient::ApiClient.new }
|
|
144
|
+
|
|
145
|
+
it 'works' do
|
|
146
|
+
expect(api_client.select_header_accept(nil)).to be_nil
|
|
147
|
+
expect(api_client.select_header_accept([])).to be_nil
|
|
148
|
+
|
|
149
|
+
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
|
150
|
+
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
|
151
|
+
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
|
152
|
+
|
|
153
|
+
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
|
154
|
+
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
describe '#select_header_content_type' do
|
|
159
|
+
let(:api_client) { PulpDebClient::ApiClient.new }
|
|
160
|
+
|
|
161
|
+
it 'works' do
|
|
162
|
+
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
|
163
|
+
expect(api_client.select_header_content_type([])).to eq('application/json')
|
|
164
|
+
|
|
165
|
+
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
|
166
|
+
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
|
167
|
+
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
|
168
|
+
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
|
169
|
+
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
describe '#sanitize_filename' do
|
|
174
|
+
let(:api_client) { PulpDebClient::ApiClient.new }
|
|
175
|
+
|
|
176
|
+
it 'works' do
|
|
177
|
+
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
|
178
|
+
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
|
179
|
+
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
|
180
|
+
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
|
181
|
+
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
|
182
|
+
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
|
183
|
+
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
|
184
|
+
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
|
185
|
+
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
|
|
15
|
+
describe PulpDebClient::Configuration do
|
|
16
|
+
let(:config) { PulpDebClient::Configuration.default }
|
|
17
|
+
|
|
18
|
+
before(:each) do
|
|
19
|
+
# uncomment below to setup host and base_path
|
|
20
|
+
# require 'URI'
|
|
21
|
+
# uri = URI.parse("http://localhost:24817")
|
|
22
|
+
# PulpDebClient.configure do |c|
|
|
23
|
+
# c.host = uri.host
|
|
24
|
+
# c.base_path = uri.path
|
|
25
|
+
# end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe '#base_url' do
|
|
29
|
+
it 'should have the default value' do
|
|
30
|
+
# uncomment below to test default value of the base path
|
|
31
|
+
# expect(config.base_url).to eq("http://localhost:24817")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'should remove trailing slashes' do
|
|
35
|
+
[nil, '', '/', '//'].each do |base_path|
|
|
36
|
+
config.base_path = base_path
|
|
37
|
+
# uncomment below to test trailing slashes
|
|
38
|
+
# expect(config.base_url).to eq("http://localhost:24817")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for PulpDebClient::AsyncOperationResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'AsyncOperationResponse' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = PulpDebClient::AsyncOperationResponse.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of AsyncOperationResponse' do
|
|
31
|
+
it 'should create an instance of AsyncOperationResponse' do
|
|
32
|
+
expect(@instance).to be_instance_of(PulpDebClient::AsyncOperationResponse)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "task"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for PulpDebClient::DebDistribution
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'DebDistribution' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = PulpDebClient::DebDistribution.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of DebDistribution' do
|
|
31
|
+
it 'should create an instance of DebDistribution' do
|
|
32
|
+
expect(@instance).to be_instance_of(PulpDebClient::DebDistribution)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "_href"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe 'test attribute "_created"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe 'test attribute "base_path"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'test attribute "base_url"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'test attribute "content_guard"' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "name"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
describe 'test attribute "publication"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for PulpDebClient::DebPublication
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'DebPublication' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = PulpDebClient::DebPublication.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of DebPublication' do
|
|
31
|
+
it 'should create an instance of DebPublication' do
|
|
32
|
+
expect(@instance).to be_instance_of(PulpDebClient::DebPublication)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "_href"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe 'test attribute "_created"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe 'test attribute "_type"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'test attribute "publisher"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'test attribute "repository_version"' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "repository"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
describe 'test attribute "simple"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
describe 'test attribute "structured"' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
end
|