MCPcopy Create free account
hub / github.com/encodeous/nylon / TestDistributionRejectsLocalNodeRemoval

Function TestDistributionRejectsLocalNodeRemoval

e2e/distribution_test.go:181–202  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

179}
180
181func TestDistributionRejectsLocalNodeRemoval(t *testing.T) {
182 t.Parallel()
183 h, repoContainer, runDir, privKey, pubKey, nodeId, originalTimestamp := startDistributedSingleNode(t)
184 ctx := context.Background()
185
186 cfg2 := state.CentralCfg{
187 Timestamp: originalTimestamp + 1,
188 Dist: &state.DistributionCfg{
189 Key: pubKey,
190 Repos: []string{"http://repo:80/bundle"},
191 },
192 Routers: nil,
193 }
194 bundlePath, _ := writeBundle(t, runDir, "bundle-local-node-removed", cfg2, privKey)
195 if err := repoContainer.CopyFileToContainer(ctx, bundlePath, "/data/bundle", 0644); err != nil {
196 t.Fatal(err)
197 }
198
199 h.WaitForLog(string(nodeId), "Found a new config update in repo")
200 h.WaitForLog(string(nodeId), "failed to apply central config update")
201 assertCentralTimestampStays(t, h, nodeId, originalTimestamp)
202}
203
204func TestDistributionRejectsInvalidCentralConfig(t *testing.T) {
205 t.Parallel()

Callers

nothing calls this directly

Calls 4

writeBundleFunction · 0.85
WaitForLogMethod · 0.80

Tested by

no test coverage detected