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

CI fixes #1820

Merged
merged 2 commits into from
Jan 11, 2024
Merged
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
10 changes: 5 additions & 5 deletions hack/ci/gce-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ function cloud_init {
# Generate local ssh configuration
# NOTE(mdbooth): This command successfully populates ssh config and then
# fails for some reason I don't understand. We ignore the failure.
gcloud compute config-ssh || true
gcloud compute config-ssh >/dev/null 2>&1 || true
}

function init_infrastructure() {
if [[ ${GCP_NETWORK_NAME} != "default" ]]; then
if ! gcloud compute networks describe "$GCP_NETWORK_NAME" --project "$GCP_PROJECT" >/dev/null; then
if ! gcloud compute networks describe "$GCP_NETWORK_NAME" --project "$GCP_PROJECT" >/dev/null 2>&1; then
gcloud compute networks create --project "$GCP_PROJECT" "$GCP_NETWORK_NAME" --subnet-mode custom
gcloud compute networks subnets create "$GCP_NETWORK_NAME" --project "$GCP_PROJECT" \
--network="$GCP_NETWORK_NAME" --range="$PRIVATE_NETWORK_CIDR" --region "$GCP_REGION"
Expand All @@ -64,12 +64,12 @@ function init_infrastructure() {
gcloud compute networks list --project="$GCP_PROJECT"
gcloud compute networks describe "$GCP_NETWORK_NAME" --project="$GCP_PROJECT"

if ! gcloud compute routers describe "${CLUSTER_NAME}-myrouter" --project="$GCP_PROJECT" --region="$GCP_REGION" >/dev/null; then
if ! gcloud compute routers describe "${CLUSTER_NAME}-myrouter" --project="$GCP_PROJECT" --region="$GCP_REGION" >/dev/null 2>&1; then
gcloud compute routers create "${CLUSTER_NAME}-myrouter" --project="$GCP_PROJECT" \
--region="$GCP_REGION" --network="$GCP_NETWORK_NAME"
fi
if ! gcloud compute routers nats describe --router="$CLUSTER_NAME-myrouter" "$CLUSTER_NAME-mynat" \
--project="$GCP_PROJECT" --region="${GCP_REGION}" >/dev/null; then
--project="$GCP_PROJECT" --region="${GCP_REGION}" >/dev/null 2>&1; then
gcloud compute routers nats create "${CLUSTER_NAME}-mynat" --project="$GCP_PROJECT" \
--router-region="$GCP_REGION" --router="${CLUSTER_NAME}-myrouter" \
--nat-all-subnet-ip-ranges --auto-allocate-nat-external-ips
Expand All @@ -89,7 +89,7 @@ function create_vm {
# Loop over all zones in the GCP region to ignore a full zone.
# We are not able to use 'gcloud compute zones list' as the gcloud.compute.zones.list permission is missing.
for GCP_ZONE in "${GCP_REGION}-a" "${GCP_REGION}-b" "${GCP_REGION}-c"; do
if ! gcloud compute instances describe "$servername" --project "$GCP_PROJECT" --zone "$GCP_ZONE" >/dev/null; then
if ! gcloud compute instances describe "$servername" --project "$GCP_PROJECT" --zone "$GCP_ZONE" >/dev/null 2>&1; then
if gcloud compute instances create "$servername" \
--project "$GCP_PROJECT" \
--zone "$GCP_ZONE" \
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/suites/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
})

Describe("Workload cluster (default)", func() {
It("It should be creatable and deletable", func() {
It("should be creatable and deletable", func() {
shared.Logf("Creating a cluster")
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
configCluster := defaultConfigCluster(clusterName, namespace.Name)
Expand Down Expand Up @@ -247,7 +247,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
})

Describe("Workload cluster (without lb)", func() {
It("Should create port(s) with custom options", func() {
It("should create port(s) with custom options", func() {
shared.Logf("Creating a cluster")
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
configCluster := defaultConfigCluster(clusterName, namespace.Name)
Expand Down Expand Up @@ -466,7 +466,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
})

Describe("MachineDeployment misconfigurations", func() {
It("Should fail to create MachineDeployment with invalid subnet or invalid availability zone", func() {
It("should fail to create MachineDeployment with invalid subnet or invalid availability zone", func() {
shared.Logf("Creating a cluster")
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
configCluster := defaultConfigCluster(clusterName, namespace.Name)
Expand Down Expand Up @@ -534,7 +534,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
Expect(err).NotTo(HaveOccurred())
})

It("It should be creatable and deletable", func() {
It("should be creatable and deletable", func() {
workerMachines := framework.GetMachinesByMachineDeployments(ctx, framework.GetMachinesByMachineDeploymentsInput{
Lister: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
ClusterName: clusterName,
Expand Down