Skip to content

Commit

Permalink
clean up of unused variables and prints
Browse files Browse the repository at this point in the history
  • Loading branch information
muscionig committed Dec 2, 2024
1 parent d99fc5c commit 7ca877d
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions test/e2e/autoscale_custom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,40 +330,27 @@ func setupCustomHPASvcWith2Revisions(t *testing.T, metric string, target int, an
},
}

revision1 := names.Revision

// Create a new revision with a different annotation
t.Logf("Updating the Service to use a different annotation")
service, err := v1test.PatchService(t, clients, resources.Service, rtesting.WithConfigAnnotations(patchAnnos))
if err != nil {
t.Fatalf("Patch update for Service %s with new annotations %s failed: %v", names.Service, patchAnnos, err)
}
// resources.Service = service

revision2, err := v1test.WaitForServiceLatestRevision(clients, *names)
if err != nil {
t.Fatalf("Service %s with new annotations %s failed the update: %v", names.Service, patchAnnos, err)
}

// revision2Object, err := clients.ServingClient.Revisions.Get(context.Background(), revision2, metav1.GetOptions{})
// if err != nil {
// t.Fatalf("Failed to get Revision %s: %v", revision2, err)
// }
t.Logf("Created Revision: %s with new annotations: %s", revision2, patchAnnos)

names2 := &test.ResourceNames{
Service: svc,
Image: autoscaleTestImageName,
}
resources2, err := getResourceObjectsRevision2(t, clients, names2, service)
if err == nil {
t.Log("Successfully patched Service", names2.Service)
t.Logf("Successfully patched Service: %s", names2.Service)
}
t.Logf("Resources2: %v", resources2)

// t.Logf("Service has 2 revisions: %s, %s, revision2Object: %s", revision1, revision2, revision2Object.Name)
t.Logf("Service has 2 revisions: %s, %s", revision1, revision2)

// resources.Revision = revision2Object

revision2Context := TestContext{
t: t,
Expand All @@ -376,7 +363,6 @@ func setupCustomHPASvcWith2Revisions(t *testing.T, metric string, target int, an
},
}

t.Logf("2 contexts created: %v, %v", revision1Context, revision2Context)
return &revision1Context, &revision2Context
}

Expand Down

0 comments on commit 7ca877d

Please sign in to comment.