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
6 changes: 3 additions & 3 deletions .github/scripts/check-gomod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ go mod tidy
go mod verify

if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
echo "actions Go mod isn't up to date. Please run `cd actions && go mod tidy`"
echo "actions Go mod isn't up to date. Please run 'cd actions && go mod tidy'"
echo "The following go files did differ after tidying them:"
git status --porcelain
exit 1
Expand All @@ -30,8 +30,8 @@ go mod tidy
go mod verify

if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
echo "interoperability Go mod isn't up to date. Please run `cd interoperability && go mod tidy`"
echo "interoperability Go mod isn't up to date. Please run 'cd interoperability && go mod tidy'"
echo "The following go files did differ after tidying them:"
git status --porcelain
exit 1
fi
fi
8 changes: 5 additions & 3 deletions actions/charts/longhorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import (
)

var (
LonghornNamespace = "longhorn-system"
LonghornChartName = "longhorn"
enableDeletionSetting = map[string]any{
LonghornStorageClass = "longhorn"
LonghornStaticStorageClass = "longhorn-static"
LonghornNamespace = "longhorn-system"
LonghornChartName = "longhorn"
enableDeletionSetting = map[string]any{
"defaultSettings": map[string]any{
"deletingConfirmationFlag": true,
},
Expand Down
14 changes: 8 additions & 6 deletions actions/charts/ranchermonitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ func InstallRancherMonitoringChart(client *rancher.Client, installOptions *Insta
}

err = wait.WatchWait(watchAppInterface, func(event watch.Event) (ready bool, err error) {
if event.Type == watch.Error {
switch event.Type {
case watch.Error:
return false, fmt.Errorf("there was an error uninstalling rancher monitoring chart")
} else if event.Type == watch.Deleted {
case watch.Deleted:
return true, nil
default:
return false, nil
}
return false, nil
})
if err != nil {
return err
Expand Down Expand Up @@ -139,7 +141,7 @@ func InstallRancherMonitoringChart(client *rancher.Client, installOptions *Insta
return true, nil
}
if state == string(catalogv1.StatusFailed) {
return false, fmt.Errorf("monitoring chart installation failed: %s", app.Status.Summary.Error)
return false, fmt.Errorf("monitoring chart installation failed with %s status", app.Status.Summary.State)
}
Comment thread
hamistao marked this conversation as resolved.
return false, nil
})
Expand Down Expand Up @@ -243,7 +245,7 @@ func UpgradeRancherMonitoringChart(client *rancher.Client, installOptions *Insta
return true, nil
}
if state == string(catalogv1.StatusFailed) {
return false, fmt.Errorf("monitoring chart upgrade failed: %s", app.Status.Summary.Error)
return false, fmt.Errorf("monitoring chart upgrade failed: %t", app.Status.Summary.Error)
}
Comment thread
hamistao marked this conversation as resolved.
return false, nil
})
Expand All @@ -268,7 +270,7 @@ func UpgradeRancherMonitoringChart(client *rancher.Client, installOptions *Insta
return true, nil
}
if state == string(catalogv1.StatusFailed) {
return false, fmt.Errorf("monitoring chart upgrade failed: %s", app.Status.Summary.Error)
return false, fmt.Errorf("monitoring chart upgrade failed: %t", app.Status.Summary.Error)
}
Comment thread
hamistao marked this conversation as resolved.
return false, nil
})
Expand Down
4 changes: 2 additions & 2 deletions actions/cloudprovider/cloudprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ func CreateCloudProviderAddOns(client *rancher.Client, clustersConfig *clusters.

case provisioninginput.HarvesterProviderName.String():

data := map[string][]byte{
"credential": []byte(credentials.HarvesterCredentialConfig.KubeconfigContent),
data := map[string]string{
"credential": credentials.HarvesterCredentialConfig.KubeconfigContent,
}

annotations := map[string]string{
Expand Down
16 changes: 4 additions & 12 deletions actions/cloudprovider/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/rancher/shepherd/extensions/defaults/providers"
"github.com/rancher/shepherd/extensions/defaults/stevetypes"
wloads "github.com/rancher/shepherd/extensions/workloads"
"github.com/rancher/shepherd/extensions/workloads/pods"
"github.com/rancher/shepherd/pkg/namegenerator"
"github.com/rancher/tests/actions/charts"
"github.com/rancher/tests/actions/clusters"
Expand All @@ -29,11 +28,10 @@ import (
)

const (
externalProviderString = "external"
clusterIPPrefix = "cip"
loadBalancerPrefix = "lb"
portName = "port"
nginxName = "nginx"
clusterIPPrefix = "cip"
loadBalancerPrefix = "lb"
portName = "port"
nginxName = "nginx"

awsUpstreamCloudProviderRepo = "https://github.com/kubernetes/cloud-provider-aws.git"
masterBranch = "master"
Expand Down Expand Up @@ -74,9 +72,6 @@ func VerifyHarvesterCloudProvider(t *testing.T, client *rancher.Client, clusterO

services.VerifyHarvesterLoadBalancer(t, client, lbServiceResp, status.ClusterName)
storage.CreatePVCWorkload(t, client, status.ClusterName, "")

podErrors := pods.StatusPods(client, status.ClusterName)
require.Empty(t, podErrors)
}

func VerifyVSphereCloudProvider(t *testing.T, client *rancher.Client, clusterObject *steveV1.SteveAPIObject) {
Expand All @@ -85,9 +80,6 @@ func VerifyVSphereCloudProvider(t *testing.T, client *rancher.Client, clusterObj
require.NoError(t, err)

storage.CreatePVCWorkload(t, client, status.ClusterName, "")

podErrors := pods.StatusPods(client, status.ClusterName)
require.Empty(t, podErrors)
}

// CreateAWSCloudProviderWorkloadAndServicesLB creates a test workload, clusterIP service and LoadBalancer service.
Expand Down
6 changes: 2 additions & 4 deletions actions/etcdsnapshot/creates.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/rancher/shepherd/extensions/defaults/stevetypes"
shepherdsnapshot "github.com/rancher/shepherd/extensions/etcdsnapshot"
"github.com/rancher/tests/actions/provisioning"
"github.com/rancher/tests/actions/storage/s3"
"github.com/rancher/tests/actions/workloads/deployment"
actionspods "github.com/rancher/tests/actions/workloads/pods"
"github.com/sirupsen/logrus"
Expand All @@ -33,9 +34,6 @@ const (
port = "port"
postWorkload = "wload-after-backup"
serviceAppendName = "service-"
s3StorageType = "s3"
s3SchemePrefix = "s3://"
storageAnnotation = "etcdsnapshot.rke.io/storage"
)

// CreateAndValidateSnapshotRestore is an e2e helper that determines the engine type of the cluster, then takes a snapshot, and finally restores the cluster to the original snapshot
Expand Down Expand Up @@ -108,7 +106,7 @@ func CreateAndValidateSnapshotV2Prov(client *rancher.Client, podTemplate *corev1
createdSnapshotIDs := []string{}

for _, snapshot := range createdSnapshots {
if CheckS3SnapshotLocation(snapshot) {
if s3.CheckS3SnapshotLocation(snapshot) {
selectedSnapshot = snapshot
snapshotToRestore = snapshot.Name
}
Expand Down
Loading
Loading