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

regression in unit tests - environment outdated since 3.9.2-45. Fixes #1993 #1994

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion conf/test-settings.conf.in
Expand Up @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

# Django settings for Rockstor project.
import os
import subprocess, distro

DEBUG = ${django-settings-conf:debug}
TEMPLATE_DEBUG = DEBUG
Expand Down Expand Up @@ -384,4 +385,23 @@ UPDATE_CHANNELS = {
'description': 'Subscription channel for testing updates',
'url': 'rockstor.com/rockrepo-testing',
},
}
}

# Setup OS specific command paths via 'which cmd' calls
# N.B. this method will not work with an alias, ie in CentOS
# which ls
# alias ls='ls --color=auto'
# /usr/bin/ls
# The following have been tested in CentOS, openSUSE Leap15, and Tumbleweed
UDEVADM = subprocess.check_output(["which", "udevadm"]).rstrip()
SHUTDOWN = subprocess.check_output(["which", "shutdown"]).rstrip()
CHKCONFIG_BIN = subprocess.check_output(["which", "chkconfig"]).rstrip()

# Establish our OS base id, name, and version:
# Use id for code path decisions. Others are for Web-UI display purposes.
# Examples given are for CentOS Rockstor variant, Leap 15, and Tumblweed.
OS_DISTRO_ID = distro.id() # rockstor, opensuse-leap, opensuse-tumbleweed
OS_DISTRO_NAME = distro.name() # Rockstor, openSUSE Leap, openSUSE Tumbleweed
# Note that the following will capture the build os version.
# For live updates (running system) we call distro.version() directly in code.
OS_DISTRO_VERSION = distro.version() # 3, 15.0 ,20181107