Skip to content

Commit 0d2db68

Browse files
author
Rahul Sharma
committed
add check for env var as well
1 parent dc54fe4 commit 0d2db68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cloud/linode/node_controller_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ func TestNodeController_handleNode(t *testing.T) {
141141
assert.NoError(t, err, "expected no error during node creation")
142142

143143
instCache := newInstances(client)
144+
145+
t.Setenv("LINODE_METADATA_TTL", "30")
144146
nodeCtrl := newNodeController(kubeClient, client, nil, instCache)
147+
assert.Equal(t, 30*time.Second, nodeCtrl.ttl, "expected ttl to be 30 seconds")
145148

146149
// Test: Successful metadata update
147150
publicIP := net.ParseIP("172.234.31.123")

0 commit comments

Comments
 (0)