morpheus-cli 8.0.0 → 8.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Morpheus
3
3
  module Cli
4
- VERSION = "8.0.0"
4
+ VERSION = "8.0.2"
5
5
  end
6
6
  end
@@ -54,6 +54,12 @@ class MorpheusTest::AuthTest < MorpheusTest::TestCase
54
54
  assert_execute %(instances list)
55
55
  end
56
56
  end
57
+ # test bug where this failed when combined with --dry-run option
58
+ without_authentication do
59
+ with_input @config.username, @config.password_decrypted do
60
+ assert_execute %(instances list -d)
61
+ end
62
+ end
57
63
  end
58
64
 
59
65
  def test_login_adhoc
@@ -7,9 +7,22 @@ class MorpheusTest::RolesTest < MorpheusTest::TestCase
7
7
  assert_execute %(roles list "System Admin")
8
8
  end
9
9
 
10
+ # def test_roles_get_system_admin
11
+ # assert_execute %(roles get "System Admin")
12
+ # assert_execute %(roles get "System Admin" --permissions)
13
+ # end
14
+
10
15
  def test_roles_get
11
- assert_execute %(roles get "System Admin")
12
- assert_execute %(roles get "System Admin" --permissions)
16
+ # role = client.roles.list({})['roles'][0]
17
+ role = client.roles.list({})['roles'].find {|r| r['authority'] !~ /\A\d+\Z/}
18
+ if role
19
+ assert_execute %(roles get "#{role['id']}")
20
+ name_arg = role['authority']
21
+ assert_execute %(roles get "#{escape_arg name_arg}")
22
+ assert_execute %(roles get "#{escape_arg name_arg}" --permissions)
23
+ else
24
+ puts "No role found, unable to execute test `#{__method__}`"
25
+ end
13
26
  end
14
27
 
15
28
  def test_roles_list_permissions
data/test/test_case.rb CHANGED
@@ -87,6 +87,7 @@ module MorpheusTest
87
87
  # assert_execute("foobar", exit:1, "Expected unknown command to fail")
88
88
  #
89
89
  def assert_execute(cmd, opts = {}, failure_message = nil)
90
+ #Morpheus::Logging::DarkPrinter.puts(cmd)
90
91
  opts = opts.is_a?(String) ? {failure_message:opts} : (opts || {})
91
92
  result = terminal.execute(cmd)
92
93
  assert_command_result(result, opts, failure_message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morpheus-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-11-15 00:00:00.000000000 Z
14
+ date: 2025-01-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: public_suffix