Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module "cucumber_testsuite" {
cc_username = ...
cc_password = ...

cc_ptf_username = ...
cc_ptf_password = ...

name_prefix = "moio-"
domain = "tf.local"
git_username = ...
Expand All @@ -31,6 +34,7 @@ module "cucumber_testsuite" {
This will create a test server, client and minion instances, plus a coordination node called a `controller` which runs the testsuite.

The example will have to be completed with SCC credentials and GitHub credentials to the SUSE Manager or Uyuni repo.
PTF SCC variables should only be used with SUSE Manager or Multi-Linux Manager versions later than 5.0.

`product_version` determines the version under test, see [README_ADVANCED.md](README_ADVANCED.md) for the list of options.

Expand Down
6 changes: 4 additions & 2 deletions main.tf.aws-testsuite.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ module "cucumber_testsuite" {
product_version = "uyuni-master"
branch = "master"

cc_username = ...
cc_password = ...
cc_username = ...
cc_password = ...
cc_ptf_username = ...
cc_ptf_password = ...

images = ["opensuse156o"]

Expand Down
4 changes: 4 additions & 0 deletions main.tf.libvirt-testsuite.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ module "cucumber_testsuite" {
cc_username = ""
cc_password = ""

# SUSE SCC credentials with PTFs available
cc_ptf_username = ""
cc_ptf_password = ""

# define what images should be used and uploaded
# https://github.com/uyuni-project/sumaform/blob/master/backend_modules/libvirt/README.md#only-upload-a-subset-of-available-images
# the following images are e.g. available:
Expand Down
16 changes: 9 additions & 7 deletions modules/controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ module "controller" {
roles = ["controller"]
product_version = var.product_version
grains = {
cc_username = var.base_configuration["cc_username"]
cc_password = var.base_configuration["cc_password"]
git_username = var.git_username
git_password = var.git_password
git_repo = var.git_repo
branch = var.branch == "default" ? var.testsuite-branch[var.base_configuration["product_version"]] : var.branch
mirror = var.no_mirror == true ? null : var.base_configuration["mirror"]
cc_username = var.base_configuration["cc_username"]
cc_password = var.base_configuration["cc_password"]
cc_ptf_username = var.cc_ptf_username
cc_ptf_password = var.cc_ptf_password
git_username = var.git_username
git_password = var.git_password
git_repo = var.git_repo
branch = var.branch == "default" ? var.testsuite-branch[var.base_configuration["product_version"]] : var.branch
mirror = var.no_mirror == true ? null : var.base_configuration["mirror"]

server = var.server_configuration["hostname"]
proxy = var.proxy_configuration["hostname"]
Expand Down
12 changes: 12 additions & 0 deletions modules/controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ variable "name" {
type = string
}

variable "cc_ptf_username" {
description = "username of SCC organization having PTFs available"
type = string
default = null
}

variable "cc_ptf_password" {
description = "password of SCC organization having PTFs available"
type = string
default = null
}

variable "git_username" {
description = "username for GitHub"
type = string
Expand Down
2 changes: 2 additions & 0 deletions modules/cucumber_testsuite/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ module "controller" {
branch = var.branch
git_username = var.git_username
git_password = var.git_password
cc_ptf_username = var.cc_ptf_username
cc_ptf_password = var.cc_ptf_password
git_repo = var.git_repo
git_profiles_repo = var.git_profiles_repo
no_auth_registry = var.no_auth_registry
Expand Down
10 changes: 10 additions & 0 deletions modules/cucumber_testsuite/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ variable "branch" {
default = "default"
}

variable "cc_ptf_username" {
description = "username of SCC organization having PTFs available"
type = string
}

variable "cc_ptf_password" {
description = "password of SCC organization having PTFs available"
type = string
}

variable "git_username" {
description = "username for GitHub"
type = string
Expand Down
4 changes: 3 additions & 1 deletion salt/controller/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export BUILD_SOURCES="dist.nue.suse.com"

# various test suite settings
export GITPROFILES="{{ grains.get('git_profiles_repo') }}"
{% if grains.get('cc_username') | default(false, true) %}export SCC_CREDENTIALS="{{ grains.get('cc_username') }}|{{ grains.get('cc_password') }}" {% else %}# no SCC Credentials defined {% endif %}
{% if grains.get('cc_username') | default(false, true) %}export SCC_CREDENTIALS="{{ grains.get('cc_username') }}|{{ grains.get('cc_password') }}" {% else %}# no SCC credentials defined {% endif %}
{% if grains.get('cc_ptf_username') | default(false, true) %}export SCC_PTF_USER="{{ grains.get('cc_ptf_username') }}" {% else %}# no SCC PTF credentials defined {% endif %}
{% if grains.get('cc_ptf_password') | default(false, true) %}export SCC_PTF_PASSWORD="{{ grains.get('cc_ptf_password') }}" {% else %}# no SCC PTF credentials defined {% endif %}
export AUTH_REGISTRY_CREDENTIALS="{{ grains.get('auth_registry_username') }}|{{ grains.get('auth_registry_password') }}"
{% if grains.get('auth_registry') | default(false, true) %}export AUTH_REGISTRY="{{ grains.get('auth_registry') }}" {% else %}# no authenticated registry defined {% endif %}
{% if grains.get('no_auth_registry') | default(false, true) %}export NO_AUTH_REGISTRY="{{ grains.get('no_auth_registry') }}" {% else %}# no container registry defined {% endif %}
Expand Down
Loading