Skip to content

Commit

Permalink
Merge branch 'master' into depfu/update/jwt-2.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom authored Nov 5, 2024
2 parents af665df + 1500238 commit eb01627
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Note: Look below for direction on publishing to registry.
```
* Alternatively, if an OBS working copy is already checked out, update the working copy by running `osc up`
2. Run `make dist` in your RMT working directory to build a tarball.
3. Copy the files from the `package/obs` directory to the OBS working directory.
3. Copy the files from the `package/obs` directory to the OBS working directory `systemsmanagement:SCC:RMT/rmt-server`.
4. Examine the changes by running `osc status` and `osc diff`.
5. Stage the changes by running `osc addremove`.
6. Build the package with osc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@

context 'when verification provider returns false' do
before do
expect(InstanceVerification::Providers::Example).to receive(:new)
.with(be_a(ActiveSupport::Logger), be_a(ActionDispatch::Request), payload, instance_data).and_return(plugin_double)
expect(plugin_double).to receive(:instance_valid?).and_return(false)
stub_request(:post, scc_activate_url)
.to_return(
status: 200,
body: { error: 'Unexpected instance verification error has occurred' }.to_json,
headers: {}
)
post url, params: payload, headers: headers
end

Expand All @@ -86,9 +89,13 @@

context 'when verification provider raises an unhandled exception' do
before do
expect(InstanceVerification::Providers::Example).to receive(:new)
.with(be_a(ActiveSupport::Logger), be_a(ActionDispatch::Request), payload, instance_data).and_return(plugin_double)
expect(plugin_double).to receive(:instance_valid?).and_raise('Custom plugin error')
stub_request(:post, scc_activate_url)
.to_return(
status: 422,
body: { error: 'Unexpected instance verification error has occurred' }.to_json,
headers: {}
)

post url, params: payload, headers: headers
end

Expand Down Expand Up @@ -623,7 +630,7 @@
.with({ headers: scc_headers, body: payload.merge({ byos_mode: 'byos' }) })
.and_return(
status: 401,
body: { error: 'error_message' }.to_json,
body: 'Migration target not allowed on this instance type',
headers: {}
)
request
Expand Down
8 changes: 8 additions & 0 deletions package/obs/rmt-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ chrpath -d %{buildroot}%{lib_dir}/vendor/bundle/ruby/*/extensions/*/*/mysql2-*/m
%dir %{_sysconfdir}/slp.reg.d
%config(noreplace) %attr(0640, %{rmt_user}, root) %{_sysconfdir}/rmt.conf
%config(noreplace) %{_sysconfdir}/slp.reg.d/rmt-server.reg

%{_mandir}/man8/rmt-cli.8%{?ext_man}
%{_bindir}/rmt-cli
%{_bindir}/rmt-data-import
Expand All @@ -289,6 +290,11 @@ chrpath -d %{buildroot}%{lib_dir}/vendor/bundle/ruby/*/extensions/*/*/mysql2-*/m
%{_unitdir}/rmt-server-systems-scc-sync.timer
%{_unitdir}/rmt-uptime-cleanup.service
%{_unitdir}/rmt-uptime-cleanup.timer
%config(noreplace) %{_unitdir}/rmt-server-mirror.timer
%config(noreplace) %{_unitdir}/rmt-server-sync.timer
%config(noreplace) %{_unitdir}/rmt-server-systems-scc-sync.timer
%config(noreplace) %{_unitdir}/rmt-uptime-cleanup.timer

%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/completions/rmt-cli
Expand Down Expand Up @@ -323,6 +329,8 @@ chrpath -d %{buildroot}%{lib_dir}/vendor/bundle/ruby/*/extensions/*/*/mysql2-*/m
%{_unitdir}/rmt-server-regsharing.timer
%{_unitdir}/rmt-server-trim-cache.service
%{_unitdir}/rmt-server-trim-cache.timer
%config(noreplace) %{_unitdir}/rmt-server-regsharing.timer
%config(noreplace) %{_unitdir}/rmt-server-trim-cache.timer

%pre
getent group %{rmt_group} >/dev/null || %{_sbindir}/groupadd -r %{rmt_group}
Expand Down

0 comments on commit eb01627

Please sign in to comment.