Skip to content

Commit

Permalink
Updated setupNodeBalancerNode to use one client
Browse files Browse the repository at this point in the history
  • Loading branch information
ezilber-akamai committed Nov 5, 2024
1 parent 5afdc9b commit b922ec3
Show file tree
Hide file tree
Showing 8 changed files with 4,114 additions and 1,254 deletions.
481 changes: 468 additions & 13 deletions test/integration/fixtures/TestInstance_NodeBalancers_List.yaml

Large diffs are not rendered by default.

731 changes: 510 additions & 221 deletions test/integration/fixtures/TestNodeBalancerNode_Create.yaml

Large diffs are not rendered by default.

813 changes: 611 additions & 202 deletions test/integration/fixtures/TestNodeBalancerNode_Get.yaml

Large diffs are not rendered by default.

817 changes: 613 additions & 204 deletions test/integration/fixtures/TestNodeBalancerNode_Update.yaml

Large diffs are not rendered by default.

818 changes: 613 additions & 205 deletions test/integration/fixtures/TestNodeBalancerNodes_List.yaml

Large diffs are not rendered by default.

813 changes: 611 additions & 202 deletions test/integration/fixtures/TestNodeBalancerNodes_ListMultiplePages.yaml

Large diffs are not rendered by default.

884 changes: 680 additions & 204 deletions test/integration/fixtures/TestNodeBalancer_Rebuild.yaml

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions test/integration/nodebalancer_config_nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ func setupNodeBalancerNode(t *testing.T, fixturesYaml string) (*linodego.Client,
t.Fatalf("Error creating nodebalancer config, got error %v", err)
}

client, instance, instanceTeardown, err := setupInstance(t, fixturesYaml+"Instance", true)
instance, err := createInstance(t, client, true)
if err != nil {
t.Fatal(err)
t.Errorf("failed to create test instance: %s", err)
}

instanceIP, err := client.AddInstanceIPAddress(context.Background(), instance.ID, false)
Expand All @@ -191,8 +191,13 @@ func setupNodeBalancerNode(t *testing.T, fixturesYaml string) (*linodego.Client,
t.Fatalf("Expected to delete a NodeBalancer Config Node, but got %v", err)
}
}
// delete the instance
if err := client.DeleteInstance(context.Background(), instance.ID); err != nil {
if t != nil {
t.Errorf("Error deleting test Instance: %s", err)
}
}
fixtureTeardown()
instanceTeardown()
}
return client, nodebalancer, config, node, teardown, err
}

0 comments on commit b922ec3

Please sign in to comment.