[drop] Simulate fatal node join failure

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-03-05 14:54:19 +01:00
parent ed719a7d3d
commit e43f6df36f
No known key found for this signature in database
GPG Key ID: 7DD3015F3DDE4B9C

View File

@ -255,6 +255,15 @@ func (c *JoinClient) startNodeAndJoin(ticket *joinproto.IssueJoinTicketResponse,
ctx, cancel := context.WithTimeout(context.Background(), c.joinTimeout)
defer cancel()
// [REMOVE THIS BLOCK] TEST @daniel-weisse
if true {
c.log.Error("Simulating fatal node failure...")
c.log.Error("Returning error from startNodeAndJoin in 1 Minute...")
time.Sleep(1 * time.Minute)
return errors.New("simulated fatal node failure")
}
// [REMOVE THIS BLOCK] TEST @daniel-weisse
clusterID, err := attestation.DeriveClusterID(ticket.MeasurementSecret, ticket.MeasurementSalt)
if err != nil {
return err