Skip to content

Commit

Permalink
add check for env var as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulait committed Dec 23, 2024
1 parent dc54fe4 commit 0d2db68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cloud/linode/node_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ func TestNodeController_handleNode(t *testing.T) {
assert.NoError(t, err, "expected no error during node creation")

instCache := newInstances(client)

t.Setenv("LINODE_METADATA_TTL", "30")
nodeCtrl := newNodeController(kubeClient, client, nil, instCache)
assert.Equal(t, 30*time.Second, nodeCtrl.ttl, "expected ttl to be 30 seconds")

// Test: Successful metadata update
publicIP := net.ParseIP("172.234.31.123")
Expand Down

0 comments on commit 0d2db68

Please sign in to comment.