Skip to content
Draft
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
28 changes: 22 additions & 6 deletions .github/actions/run-hostbusters-dualstack-test-suites/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,29 @@ runs:
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/dualstack \
--packages=github.com/rancher/tests/validation/snapshot/rke2/dualstack \
--junitfile results.xml \
--jsonfile results_snapshot.json \
--jsonfile results_rke2_snapshot.json \
-- -timeout=5h -tags=recurring -v

snap_restore_exit=$?
echo "snap_restore_exit=$snap_restore_exit" >> "$GITHUB_ENV"
cp results_snapshot.json results.json
rke2_snapshot_exit=$?
echo "rke2_snapshot_exit=$rke2_snapshot_exit" >> "$GITHUB_ENV"
cp results_rke2_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
./validation/reporter
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/k3s/dualstack \
--junitfile results.xml \
--jsonfile results_k3s_snapshot.json \
-- -timeout=5h -tags=recurring -v

k3s_snapshot_exit=$?
echo "k3s_snapshot_exit=$k3s_snapshot_exit" >> "$GITHUB_ENV"
cp results_k3s_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
Expand Down Expand Up @@ -125,7 +140,8 @@ runs:
[delete_exit]="Delete Cluster:results_delete.json"
[node_scale_exit]="Node Scaling:results_node_scale.json"
[prov_exit]="Provisioning:results_prov.json"
[snap_restore_exit]="Snapshot Restore:results_snapshot.json"
[rke2_snapshot_exit]="RKE2:results_rke2_snapshot.json"
[k3s_snapshot_exit]="K3S:results_k3s_snapshot.json"
[upgrade_exit]="Kubernetes Upgrade:results_upgrade.json"
)

Expand Down
27 changes: 21 additions & 6 deletions .github/actions/run-hostbusters-ipv6-test-suites/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,29 @@ runs:
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/ipv6 \
--packages=github.com/rancher/tests/validation/snapshot/rke2/ipv6 \
--junitfile results.xml \
--jsonfile results_snapshot.json \
--jsonfile results_rke2_snapshot.json \
-- -timeout=5h -tags=recurring -v

snap_restore_exit=$?
echo "snap_restore_exit=$snap_restore_exit" >> "$GITHUB_ENV"
cp results_snapshot.json results.json
rke2_snapshot_exit=$?
echo "rke2_snapshot_exit=$rke2_snapshot_exit" >> "$GITHUB_ENV"
cp results_rke2_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
./validation/reporter
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/k3s/ipv6 \
--junitfile results.xml \
--jsonfile results_k3s_snapshot.json \
-- -timeout=5h -tags=recurring -v

k3s_snapshot_exit=$?
echo "k3s_snapshot_exit=$k3s_snapshot_exit" >> "$GITHUB_ENV"
cp results_k3s_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
Expand Down Expand Up @@ -125,7 +140,7 @@ runs:
[delete_exit]="Delete Cluster:results_delete.json"
[node_scale_exit]="Node Scaling:results_node_scale.json"
[prov_exit]="Provisioning:results_prov.json"
[snap_restore_exit]="Snapshot Restore:results_snapshot.json"
[rke2_snapshot_exit]="RKE2:results_rke2_snapshot.json"
[upgrade_exit]="Kubernetes Upgrade:results_upgrade.json"
)

Expand Down
28 changes: 22 additions & 6 deletions .github/actions/run-hostbusters-test-suites/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,29 @@ runs:
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/rke2k3s \
--packages=github.com/rancher/tests/validation/snapshot/rke2 \
--junitfile results.xml \
--jsonfile results_snapshot.json \
--jsonfile results_rke2_snapshot.json \
-- -timeout=5h -tags=recurring -v

snapshot_exit=$?
echo "snapshot_exit=$snapshot_exit" >> "$GITHUB_ENV"
cp results_snapshot.json results.json
rke2_snapshot_exit=$?
echo "rke2_snapshot_exit=$rke2_snapshot_exit" >> "$GITHUB_ENV"
cp results_rke2_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
./validation/reporter
fi

gotestsum --format standard-verbose \
--packages=github.com/rancher/tests/validation/snapshot/k3s \
--junitfile results.xml \
--jsonfile results_k3s_snapshot.json \
-- -timeout=5h -tags=recurring -v

k3s_snapshot_exit=$?
echo "k3s_snapshot_exit=$k3s_snapshot_exit" >> "$GITHUB_ENV"
cp results_k3s_snapshot.json results.json

if [[ "${{ inputs.reporting }}" == "true" ]]; then
./validation/pipeline/scripts/build_qase_reporter_v2.sh;
Expand Down Expand Up @@ -141,7 +156,8 @@ runs:
[nodescaling_exit]="Node Scaling:results_node_scale.json"
[k3s_exit]="K3S:results_k3s.json"
[rke2_exit]="RKE2:results_rke2.json"
[snapshot_exit]="Snapshot Restore:results_snapshot.json"
[k3s_snapshot_exit]="K3S:results_k3s_snapshot.json"
[rke2_snapshot_exit]="RKE2:results_rke2_snapshot.json"
[upgrade_exit]="Kubernetes Upgrade:results_upgrade.json"
)

Expand Down
1 change: 1 addition & 0 deletions actions/config/defaults/clusterconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

const (
ClusterConfigKey = "clusterConfig"
RancherConfigKey = "rancher"
AWSEC2Configs = "awsEC2Configs"
K8SVersionKey = "kubernetesVersion"
CNIKey = "cni"
Expand Down
131 changes: 2 additions & 129 deletions validation/snapshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,132 +17,5 @@ Please see below for more details for your config. Please note that the config c
1. [Getting Started](#Getting-Started)
2. [Running Tests](#Running-Tests)

## Getting Started
Please see an example config below using AWS as the node provider to first provision the cluster:

```yaml
rancher:
host: ""
adminToken: ""
insecure: true

provisioningInput:
cni: ["calico"]
providers: ["aws"]
nodeProviders: ["ec2"]

clusterConfig:
cni: "calico"
provider: "aws"
nodeProvider: "ec2"

awsCredentials:
secretKey: ""
accessKey: ""
defaultRegion: "us-east-2"

awsMachineConfigs:
region: "us-east-2"
awsMachineConfig:
- roles: ["etcd", "controlplane", "worker"]
ami: ""
instanceType: ""
sshUser: ""
vpcId: ""
volumeType: ""
zone: "a"
retries: ""
rootSize: ""
securityGroup: [""]

amazonec2Config:
accessKey: ""
ami: ""
blockDurationMinutes: "0"
encryptEbsVolume: false
httpEndpoint: "enabled"
httpTokens: "optional"
iamInstanceProfile: ""
insecureTransport: false
instanceType: ""
monitoring: false
privateAddressOnly: false
region: "us-east-2"
requestSpotInstance: true
retries: ""
rootSize: ""
secretKey: ""
securityGroup: [""]
securityGroupReadonly: false
spotPrice: ""
sshKeyContents: ""
sshUser: ""
subnetId: ""
tags: ""
type: "amazonec2Config"
useEbsOptimizedInstance: false
usePrivateAddress: false
volumeType: ""
vpcId: ""
zone: "a"
```

If you plan to run the `snapshot_restore_wins_test.go`, your config must include the following:

```yaml
awsEC2Configs:
region: "us-east-2"
awsSecretAccessKey: ""
awsAccessKeyID: ""
awsEC2Config:
- instanceType: ""
awsRegionAZ: ""
awsAMI: ""
awsSecurityGroups: [""]
awsSSHKeyName: ""
awsCICDInstanceTag: ""
awsIAMProfile: ""
awsCICDInstanceTag: ""
awsUser: ""
volumeSize:
roles: ["etcd", "controlplane", "worker"]
- instanceType: ""
awsRegionAZ: ""
awsAMI: ""
awsSecurityGroups: [""]
awsSSHKeyName: ""
awsCICDInstanceTag: ""
awsUser: "Administrator"
volumeSize:
roles: ["windows"]
sshPath:
sshPath: "/<path to .ssh folder>"
```

### Running Tests

#### RKE1
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke1 --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestRKE1SnapshotRestoreTestSuite/TestRKE1SnapshotRestore"`

#### RKE2/K3s
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke2k3s --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotRestoreTestSuite/TestSnapshotRestore"`

#### IPv6
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/ipv6 --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotIPv6RestoreTestSuite/TestSnapshotIPv6Restore"`

#### Dualstack
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/dualstack --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotDualstackRestoreTestSuite/TestSnapshotDualstackRestore"`

#### S3
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke1 --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestRKE1S3SnapshotRestoreTestSuite/TestRKE1S3SnapshotRestore"` \
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke2k3s --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestS3SnapshotRestoreTestSuite/TestS3SnapshotRestore"`

#### Windows
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke2k3s --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotRestoreWindowsTestSuite/TestSnapshotRestoreWindows"`

#### Retention
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke2k3s --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotRetentionTestSuite/TestAutomaticSnapshotRetention"`

#### Recurring
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke1 --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestRKE1SnapshotRecurringTestSuite/TestRKE1SnapshotRecurringRestores"` \
`gotestsum --format standard-verbose --packages=github.com/rancher/tests/validation/snapshot/rke2k3s --junitfile results.xml -- -timeout=60m -tags=validation -v -run "TestSnapshotRecurringTestSuite/TestSnapshotRecurringRestores"`
## Cluster Configuration
If the user doesn't provide an existing cluster via the rancher.clusterName you can find configuration details for node driver/custom clusters here: [provisioning](../provisioning/README.md)
Loading
Loading