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

Acceptance tests should use "subscription-manager status" #105

Open
LalatenduMohanty opened this issue Sep 1, 2016 · 0 comments
Open

Acceptance tests should use "subscription-manager status" #105

LalatenduMohanty opened this issue Sep 1, 2016 · 0 comments

Comments

@LalatenduMohanty
Copy link
Contributor

Currently we use [1] subscription-manager version to check if the registration happened successfully or not.
I tested it found that it returns exist code 0 in case of unregistered machines too though the status output changes to server type: This system is currently not registered.

So I think we should use subscription-manager status as per --help
status Show status information for this system's subscriptions and products
Also I tested it for registered system and unregistered system and the exit code and output both changes correctly.

For unregistered systems

[vagrant@rhel-cdk ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

[vagrant@rhel-cdk ~]$ echo $?
1

For registered systems

[vagrant@rhel-cdk ~]$ sudo subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[1] https://github.com/projectatomic/adb-vagrant-registration/blob/master/features/support/env.rb#L56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant