MCPcopy
hub / github.com/lxc/incus / TestNodeIsOutdated_OneNodeWithLowerVersion

Function TestNodeIsOutdated_OneNodeWithLowerVersion

internal/server/db/node_test.go:104–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestNodeIsOutdated_OneNodeWithLowerVersion(t *testing.T) {
105 tx, cleanup := db.NewTestClusterTx(t)
106 defer cleanup()
107
108 id, err := tx.CreateNode("buzz", "1.2.3.4:666")
109 require.NoError(t, err)
110
111 ver := [2]int{cluster.SchemaVersion, len(version.APIExtensions) - 1}
112 err = tx.SetNodeVersion(id, ver)
113 require.NoError(t, err)
114
115 outdated, err := tx.NodeIsOutdated(context.Background())
116 require.NoError(t, err)
117
118 assert.False(t, outdated)
119}
120
121func TestGetLocalNodeName(t *testing.T) {
122 tx, cleanup := db.NewTestClusterTx(t)

Callers

nothing calls this directly

Calls 4

NewTestClusterTxFunction · 0.92
CreateNodeMethod · 0.80
SetNodeVersionMethod · 0.80
NodeIsOutdatedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…