Skip to content

Commit e8a3de0

Browse files
authored
fix: Clean up test suite (#1587)
Signed-off-by: matttrach <matt.trachier@suse.com>
1 parent 328523d commit e8a3de0

File tree

106 files changed

+580
-11396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+580
-11396
lines changed

.github/workflows/pull_request.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,18 @@ jobs:
9999
# This format enables automatic generation of changelogs and versioning
100100
filter() {
101101
COMMIT="$1"
102-
ouput="$(echo "$COMMIT" | grep -e '^fix: ' -e '^feature: ' -e '^feat: ' -e 'refactor!: ' -e 'feature!: ' -e 'feat!: ' -e '^chore(main): ')"
102+
output="$(echo "$COMMIT" | grep -v -e '^fix: ' -e '^feature: ' -e '^feat: ' -e '^refactor!: ' -e '^feature!: ' -e '^feat!: ' -e '^chore(main): ' -e '^Merge branch ')"
103103
echo "$output"
104104
}
105105
prefix_check() {
106106
message="$1"
107107
if [ "" != "$(filter "$message")" ]; then
108-
echo "...Commit message does not start with the required prefix.
109-
Please use one of the following prefixes: "fix:", "feature:", "feat:", "refactor!:", "feature!:", or "feat!:".
110-
This enables release-please to automatically determine the type of release (major, minor, patch) based on the commit message.
111-
$message"
108+
cat <<EOF
109+
...Commit message does not start with the required prefix.
110+
Please use one of the following prefixes: "fix:", "feature:", "feat:", "refactor!:", "feature!:", or "feat!:".
111+
This enables release-please to automatically determine the type of release (major, minor, patch) based on the commit message.
112+
$message
113+
EOF
112114
exit 1
113115
else
114116
echo "...Commit message starts with the required prefix."
@@ -125,16 +127,17 @@ jobs:
125127
}
126128
length_check() {
127129
message="$1"
128-
if [ "$(wc -m <<<"$message")" -gt 50 ]; then
129-
echo "...Commit message subject line should be less than 50 characters, found $(wc -m "$message")."
130+
length="$(wc -m <<<"$message")"
131+
if [ $length -gt 50 ]; then
132+
echo "...Commit message subject line should be less than 50 characters, found $length."
130133
exit 1
131134
else
132135
echo "...Commit message subject line is less than 50 characters."
133136
fi
134137
}
135138
spell_check() {
136139
message="$1"
137-
WORDS="$(aspell list <<<"$message")"
140+
WORDS="$(aspell list --dont-validate-words <<<"$message")"
138141
if [ "" != "$WORDS" ]; then
139142
echo "...Commit message contains spelling errors on: ^$WORDS\$"
140143
echo "...Also try updating the PR title."

aspell_custom.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
rancher
2+
rke
3+
rke2
4+
oci
5+
oke
6+
aws
7+
azure
8+
aks
9+
eks
10+
kubernetes
11+
kubeconfig
12+
config
13+
git
14+
variablize
15+
terraform
File renamed without changes.

examples/deploy_rke2/main.tf renamed to examples/deploy_downstream_basic/main.tf

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,30 @@ provider "rancher2" {
2323
}
2424

2525
locals {
26-
identifier = var.identifier
27-
example = "downstream"
28-
project_name = "tf-${substr(md5(join("-", [local.example, local.identifier])), 0, 5)}"
29-
username = local.project_name
30-
domain = local.project_name
31-
zone = var.zone
32-
key_name = var.key_name
33-
key = var.key
34-
owner = var.owner
35-
rke2_version = var.rke2_version
36-
local_file_path = var.file_path
37-
runner_ip = chomp(data.http.myip.response_body) # "runner" is the server running Terraform
38-
rancher_version = var.rancher_version
39-
cert_manager_version = "1.16.3" #"1.13.1"
40-
os = "sle-micro-61"
41-
aws_access_key_id = var.aws_access_key_id
42-
aws_secret_access_key = var.aws_secret_access_key
43-
aws_region = var.aws_region
44-
aws_session_token = var.aws_session_token
45-
aws_instance_type = "m5.large"
46-
node_count = 3
47-
email = (var.email != "" ? var.email : "${local.identifier}@${local.zone}")
48-
acme_server_url = "https://acme-v02.api.letsencrypt.org"
26+
identifier = var.identifier
27+
example = "downstream"
28+
project_name = "tf-${substr(md5(join("-", [local.example, local.identifier])), 0, 5)}"
29+
username = local.project_name
30+
domain = local.project_name
31+
zone = var.zone
32+
key_name = var.key_name
33+
key = var.key
34+
owner = var.owner
35+
rke2_version = var.rke2_version
36+
local_file_path = var.file_path
37+
runner_ip = chomp(data.http.myip.response_body) # "runner" is the server running Terraform
38+
rancher_version = var.rancher_version
39+
cert_manager_version = "1.16.3" #"1.13.1"
40+
os = "sle-micro-61"
41+
aws_access_key_id = var.aws_access_key_id
42+
aws_secret_access_key = var.aws_secret_access_key
43+
aws_region = var.aws_region
44+
aws_session_token = var.aws_session_token
45+
aws_instance_type = "m5.large"
46+
node_count = 3
47+
email = (var.email != "" ? var.email : "${local.identifier}@${local.zone}")
48+
acme_server_url = "https://acme-v02.api.letsencrypt.org"
49+
downstream_cluster_name = "${local.project_name}-aio"
4950
}
5051

5152
data "http" "myip" {
@@ -54,7 +55,7 @@ data "http" "myip" {
5455

5556
module "rancher" {
5657
source = "rancher/aws/rancher2"
57-
version = "1.2.2"
58+
version = "2.0.1"
5859
# project
5960
identifier = local.identifier
6061
owner = local.owner
@@ -111,7 +112,7 @@ module "downstream" {
111112
]
112113
source = "./modules/downstream"
113114
# general
114-
name = "${local.project_name}-aio"
115+
name = local.downstream_cluster_name
115116
identifier = local.identifier
116117
owner = local.owner
117118
# aws access
@@ -143,3 +144,12 @@ module "downstream" {
143144
# rke2 info
144145
rke2_version = local.rke2_version
145146
}
147+
148+
data "rancher2_cluster_v2" "downstream" {
149+
depends_on = [
150+
module.rancher,
151+
module.rke2_image,
152+
module.downstream,
153+
]
154+
name = local.downstream_cluster_name
155+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "cluster_id" {
2+
value = rancher2_cluster_v2.rke2_cluster.cluster_v1_id
3+
}

examples/deploy_rke2_multiple_pools/outputs.tf renamed to examples/deploy_downstream_basic/outputs.tf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@ output "kubeconfig" {
88
output "address" {
99
value = module.rancher.address
1010
}
11-
# output "admin_token" {
12-
# value = module.rancher.admin_token
13-
# sensitive = true
14-
# }
1511
output "admin_password" {
1612
value = module.rancher.admin_password
1713
sensitive = true
1814
}
19-
20-
# output "rke2_cluster_subnet" {
21-
# value = module.rke2_cluster_access.subnets[keys(module.rke2_cluster_access.subnets)[0]]
22-
# }
15+
output "downstream_kubeconfig" {
16+
value = data.rancher2_cluster_v2.downstream.kube_config
17+
sensitive = true
18+
}

0 commit comments

Comments
 (0)