linux_admin 1.2.0 → 1.2.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a863d63cfccd0d251315f154912c9422cb7ca216cf324da353b073c659b115c8
|
4
|
+
data.tar.gz: 4187ad54595560e76bcfe08c8bdac09b2d430cd1e2b05d678b0f4173a5d1db09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 364f16b054e815863a566c502853b46e2001b48a91abb47f9557b8173459b58db3be7b45a6700c2ec190c3e54c9289688c42d83d65962833c1a7a20a7ef94e58
|
7
|
+
data.tar.gz: 46da4ef5979a2dd28ba4bd6195bffcb239d0b42b6a051e04110fb0e5b8a51db5dbec4faaed6e930d8d4a7640e9e3ab722f38467f7fb2a6e52f28e0af16d9c13e
|
@@ -6,7 +6,7 @@ module LinuxAdmin
|
|
6
6
|
Common.run!(cmd, options)
|
7
7
|
rescue AwesomeSpawn::CommandResultError => err
|
8
8
|
raise CredentialError.new(err.result) if err.result.error.downcase.include?("invalid username or password")
|
9
|
-
raise
|
9
|
+
raise SubscriptionManagerError.new(err.message, err.result)
|
10
10
|
end
|
11
11
|
|
12
12
|
SATELLITE6_SERVER_CERT_PATH = "pub/katello-ca-consumer-latest.noarch.rpm"
|
data/lib/linux_admin/version.rb
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
describe LinuxAdmin::SubscriptionManager do
|
2
|
+
context "#run!" do
|
3
|
+
it "raises a CredentialError if the error message contained a credential error" do
|
4
|
+
result = AwesomeSpawn::CommandResult.new("stuff", "things", "invalid username or password", 1)
|
5
|
+
err = AwesomeSpawn::CommandResultError.new("things", result)
|
6
|
+
expect(LinuxAdmin::Common).to receive(:run!).and_raise(err)
|
7
|
+
|
8
|
+
expect { subject.run!("stuff") }.to raise_error(LinuxAdmin::CredentialError)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "raises a SubscriptionManagerError if the error message does not contain a credential error" do
|
12
|
+
result = AwesomeSpawn::CommandResult.new("stuff", "things", "not a credential error", 1)
|
13
|
+
err = AwesomeSpawn::CommandResultError.new("things", result)
|
14
|
+
expect(LinuxAdmin::Common).to receive(:run!).and_raise(err)
|
15
|
+
|
16
|
+
expect { subject.run!("stuff") }.to raise_error(LinuxAdmin::SubscriptionManagerError)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
2
20
|
context "#registered?" do
|
3
21
|
it "system with subscription-manager commands" do
|
4
22
|
expect(LinuxAdmin::Common).to receive(:run).once.with("subscription-manager identity")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dunne
|
@@ -23,7 +23,7 @@ authors:
|
|
23
23
|
autorequire:
|
24
24
|
bindir: bin
|
25
25
|
cert_chain: []
|
26
|
-
date:
|
26
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
27
27
|
dependencies:
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
@@ -191,7 +191,7 @@ description: |2
|
|
191
191
|
It should be a single place to manage various system level configurations,
|
192
192
|
registration, updates, etc.
|
193
193
|
email:
|
194
|
-
-
|
194
|
+
- brandondunne@hotmail.com
|
195
195
|
- fryguy9@gmail.com
|
196
196
|
- mmorsi@redhat.com
|
197
197
|
- jrafanie@redhat.com
|
@@ -320,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
320
|
version: '0'
|
321
321
|
requirements: []
|
322
322
|
rubyforge_project:
|
323
|
-
rubygems_version: 2.7.
|
323
|
+
rubygems_version: 2.7.6
|
324
324
|
signing_key:
|
325
325
|
specification_version: 4
|
326
326
|
summary: LinuxAdmin is a module to simplify management of linux systems.
|