Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdk-3.3.0 breaks shared examples for rhsm_repos facts #124

Open
waveclaw opened this issue Oct 17, 2024 · 0 comments
Open

pdk-3.3.0 breaks shared examples for rhsm_repos facts #124

waveclaw opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@waveclaw
Copy link
Owner

The unit test for returning nothing on unsupported platforms is failing due to broken stubs for the '/usr/sbin/subscription-manager repos' command when used with PDK 3.3.0.

Failures:

  1) Facter::Util::RhsmAvailablePools on a supported platform returns nothing when there is an error with subscription
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `rescue in rhsm_available_pools'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:43:in `rhsm_available_pools'
     # ./spec/facter/util/rhsm_available_pools_spec.rb:101:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/facter/util/rhsm_available_pools_spec.rb:99:in `throw'

  2) Facter::Util::RhsmAvailablePools on a supported platform returns nothing when there is an error with output
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `rescue in rhsm_available_pools'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:43:in `rhsm_available_pools'
     # ./spec/facter/util/rhsm_available_pools_spec.rb:110:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/facter/util/rhsm_available_pools_spec.rb:108:in `throw'

  3) Facter::Util::RhsmAvailablePools on a supported platform without caching returns nothing when there is an error
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `rescue in rhsm_available_pools'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:43:in `rhsm_available_pools'
     # ./spec/facter/util/rhsm_available_pools_spec.rb:143:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/facter/util/rhsm_available_pools_spec.rb:142:in `throw'

  4) Facter::Util::RhsmAvailablePools on an unsupported platform returns nothing
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager list --available': command not found>
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:50:in `rescue in rhsm_available_pools'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:43:in `rhsm_available_pools'
     # ./spec/facter/util/rhsm_available_pools_spec.rb:171:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Facter::Core::Execution::ExecutionFailure:
     #   Could not execute '/usr/sbin/subscription-manager list --available': command not found
     #   ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_pools.rb:44:in `rhsm_available_pools'

  5) Facter::Util::RhsmAvailableRepos on a supported platform behaves like rhsm repo command returns nothing when there is an error
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     Shared Example Group: "rhsm repo command" called from ./spec/facter/util/rhsm_available_repos_spec.rb:21
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:45:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:45:in `rescue in rhsm_available_repos'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:32:in `rhsm_available_repos'
     # ./spec/repo_tests.rb:119:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/repo_tests.rb:118:in `throw'

  6) Facter::Util::RhsmAvailableRepos on an unsupported platform returns nothing
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager repos': command not found>
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:45:in `!~'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:45:in `rescue in rhsm_available_repos'
     # ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:32:in `rhsm_available_repos'
     # ./spec/facter/util/rhsm_available_repos_spec.rb:32:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Facter::Core::Execution::ExecutionFailure:
     #   Could not execute '/usr/sbin/subscription-manager repos': command not found
     #   ./spec/fixtures/modules/subscription_manager/lib/facter/rhsm_available_repos.rb:33:in `rhsm_available_repos'

  7) Facter::Util::RhsmDisabledPools on a supported platform behaves like consumed pools returns nothing when there is an error
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     Shared Example Group: "consumed pools" called from ./spec/facter/util/rhsm_disabled_pools_spec.rb:21
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `!~'
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `rescue in rhsm_disabled_pools'
     # ./lib/facter/rhsm_disabled_pools.rb:52:in `rhsm_disabled_pools'
     # ./spec/pool_tests.rb:200:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/pool_tests.rb:199:in `throw'

  8) Facter::Util::RhsmDisabledPools on a supported platform behaves like consumed pools returns nothing when there is an error with output
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
     Shared Example Group: "consumed pools" called from ./spec/facter/util/rhsm_disabled_pools_spec.rb:21
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `!~'
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `rescue in rhsm_disabled_pools'
     # ./lib/facter/rhsm_disabled_pools.rb:52:in `rhsm_disabled_pools'
     # ./spec/pool_tests.rb:209:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # UncaughtThrowError:
     #   uncaught throw Facter::Core::Execution::ExecutionFailure
     #   ./spec/pool_tests.rb:207:in `throw'

  9) Facter::Util::RhsmDisabledPools on an unsupported platform returns nothing
     Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
     
     NoMethodError:
       undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager list --consumed': command not found>
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `!~'
     # ./lib/facter/rhsm_disabled_pools.rb:59:in `rescue in rhsm_disabled_pools'
     # ./lib/facter/rhsm_disabled_pools.rb:52:in `rhsm_disabled_pools'
     # ./spec/facter/util/rhsm_disabled_pools_spec.rb:33:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Facter::Core::Execution::ExecutionFailure:
     #   Could not execute '/usr/sbin/subscription-manager list --consumed': command not found
     #   ./lib/facter/rhsm_disabled_pools.rb:53:in `rhsm_disabled_pools'

  10) Facter::Util::RhsmDisabledRepos on a supported platform behaves like rhsm repo command returns nothing when there is an error
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
      Shared Example Group: "rhsm repo command" called from ./spec/facter/util/rhsm_disabled_repos_spec.rb:20
      # ./lib/facter/rhsm_disabled_repos.rb:51:in `!~'
      # ./lib/facter/rhsm_disabled_repos.rb:51:in `rescue in rhsm_disabled_repos'
      # ./lib/facter/rhsm_disabled_repos.rb:32:in `rhsm_disabled_repos'
      # ./spec/repo_tests.rb:119:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # UncaughtThrowError:
      #   uncaught throw Facter::Core::Execution::ExecutionFailure
      #   ./spec/repo_tests.rb:118:in `throw'

  11) Facter::Util::RhsmDisabledRepos on an unsupported platform returns nothing
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager repos': command not found>
      # ./lib/facter/rhsm_disabled_repos.rb:51:in `!~'
      # ./lib/facter/rhsm_disabled_repos.rb:51:in `rescue in rhsm_disabled_repos'
      # ./lib/facter/rhsm_disabled_repos.rb:32:in `rhsm_disabled_repos'
      # ./spec/facter/util/rhsm_disabled_repos_spec.rb:31:in `block (3 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # Facter::Core::Execution::ExecutionFailure:
      #   Could not execute '/usr/sbin/subscription-manager repos': command not found
      #   ./lib/facter/rhsm_disabled_repos.rb:34:in `rhsm_disabled_repos'

  12) Facter::Util::RhsmEnabledPools on a supported platform behaves like consumed pools returns nothing when there is an error
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
      Shared Example Group: "consumed pools" called from ./spec/facter/util/rhsm_enabled_pools_spec.rb:21
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `!~'
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `rescue in rhsm_enabled_pools'
      # ./lib/facter/rhsm_enabled_pools.rb:52:in `rhsm_enabled_pools'
      # ./spec/pool_tests.rb:200:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # UncaughtThrowError:
      #   uncaught throw Facter::Core::Execution::ExecutionFailure
      #   ./spec/pool_tests.rb:199:in `throw'

  13) Facter::Util::RhsmEnabledPools on a supported platform behaves like consumed pools returns nothing when there is an error with output
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
      Shared Example Group: "consumed pools" called from ./spec/facter/util/rhsm_enabled_pools_spec.rb:21
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `!~'
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `rescue in rhsm_enabled_pools'
      # ./lib/facter/rhsm_enabled_pools.rb:52:in `rhsm_enabled_pools'
      # ./spec/pool_tests.rb:209:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # UncaughtThrowError:
      #   uncaught throw Facter::Core::Execution::ExecutionFailure
      #   ./spec/pool_tests.rb:207:in `throw'

  14) Facter::Util::RhsmEnabledPools on an unsupported platform returns nothing
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager list --consumed': command not found>
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `!~'
      # ./lib/facter/rhsm_enabled_pools.rb:59:in `rescue in rhsm_enabled_pools'
      # ./lib/facter/rhsm_enabled_pools.rb:52:in `rhsm_enabled_pools'
      # ./spec/facter/util/rhsm_enabled_pools_spec.rb:33:in `block (3 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # Facter::Core::Execution::ExecutionFailure:
      #   Could not execute '/usr/sbin/subscription-manager list --consumed': command not found
      #   ./lib/facter/rhsm_enabled_pools.rb:53:in `rhsm_enabled_pools'

  15) Facter::Util::RhsmEnabledRepos on a supported platform behaves like rhsm repo command returns nothing when there is an error
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
      Shared Example Group: "rhsm repo command" called from ./spec/facter/util/rhsm_enabled_repos_spec.rb:21
      # ./lib/facter/rhsm_enabled_repos.rb:51:in `!~'
      # ./lib/facter/rhsm_enabled_repos.rb:51:in `rescue in rhsm_enabled_repos'
      # ./lib/facter/rhsm_enabled_repos.rb:32:in `rhsm_enabled_repos'
      # ./spec/repo_tests.rb:119:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # UncaughtThrowError:
      #   uncaught throw Facter::Core::Execution::ExecutionFailure
      #   ./spec/repo_tests.rb:118:in `throw'

  16) Facter::Util::RhsmEnabledRepos on an unsupported platform returns nothing
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<Facter::Core::Execution::ExecutionFailure: Could not execute '/usr/sbin/subscription-manager repos': command not found>
      # ./lib/facter/rhsm_enabled_repos.rb:51:in `!~'
      # ./lib/facter/rhsm_enabled_repos.rb:51:in `rescue in rhsm_enabled_repos'
      # ./lib/facter/rhsm_enabled_repos.rb:32:in `rhsm_enabled_repos'
      # ./spec/facter/util/rhsm_enabled_repos_spec.rb:32:in `block (3 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # Facter::Core::Execution::ExecutionFailure:
      #   Could not execute '/usr/sbin/subscription-manager repos': command not found
      #   ./lib/facter/rhsm_enabled_repos.rb:34:in `rhsm_enabled_repos'

  17) Facter::Util::RhsmIdentity returns the nothing for an error
      Failure/Error: if $ERROR_INFO !~ %r{This system is not yet registered}
      
      NoMethodError:
        undefined method `=~' for #<UncaughtThrowError: uncaught throw Facter::Core::Execution::ExecutionFailure>
      # ./lib/facter/rhsm_identity.rb:46:in `!~'
      # ./lib/facter/rhsm_identity.rb:46:in `rescue in rhsm_identity'
      # ./lib/facter/rhsm_identity.rb:33:in `rhsm_identity'
      # ./spec/facter/util/rhsm_identity_spec.rb:58:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # UncaughtThrowError:
      #   uncaught throw Facter::Core::Execution::ExecutionFailure
      #   ./spec/facter/util/rhsm_identity_spec.rb:55:in `throw'

Finished in 4.23 seconds (files took 0.88473 seconds to load)
867 examples, 17 failures
@waveclaw waveclaw self-assigned this Oct 17, 2024
@waveclaw waveclaw added the bug label Oct 17, 2024
@waveclaw waveclaw added this to the 5.0.0 milestone Oct 17, 2024
@waveclaw waveclaw pinned this issue Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant