mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 07:25:51 -04:00
fix other issues caused by variable renaming
This commit is contained in:
parent
0e1e49623f
commit
3dfa405fb9
@ -271,7 +271,7 @@ func (c *JoinClient) startNodeAndJoin(ticket *joinproto.IssueJoinTicketResponse,
|
||||
return fmt.Errorf("writing kubelet key: %w", err)
|
||||
}
|
||||
|
||||
if err := c.fileHandler.Write(constants.SSHCAKeyPath, ticket.EmergencyCaKey, file.OptMkdirAll); err != nil {
|
||||
if err := c.fileHandler.Write(constants.SSHCAKeyPath, ticket.AuthorizedCaPublicKey, file.OptMkdirAll); err != nil {
|
||||
return fmt.Errorf("writing ssh ca key: %w", err)
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ func TestClient(t *testing.T) {
|
||||
{Role: role.ControlPlane, Name: "node-5", VPCIP: "192.0.2.3"},
|
||||
}
|
||||
caDerivationKey := make([]byte, 256)
|
||||
respCaKey := &joinproto.IssueJoinTicketResponse{EmergencyCaKey: caDerivationKey}
|
||||
respCaKey := &joinproto.IssueJoinTicketResponse{AuthorizedCaPublicKey: caDerivationKey}
|
||||
|
||||
testCases := map[string]struct {
|
||||
role role.Role
|
||||
@ -144,22 +144,6 @@ func TestClient(t *testing.T) {
|
||||
wantJoin: true,
|
||||
wantLock: true,
|
||||
},
|
||||
"on worker: no CA derivation key is given": {
|
||||
role: role.Worker,
|
||||
apiAnswers: []any{
|
||||
selfAnswer{instance: workerSelf},
|
||||
listAnswer{instances: peers},
|
||||
issueJoinTicketAnswer{err: assert.AnError},
|
||||
listAnswer{instances: peers},
|
||||
issueJoinTicketAnswer{err: assert.AnError},
|
||||
listAnswer{instances: peers},
|
||||
issueJoinTicketAnswer{},
|
||||
},
|
||||
clusterJoiner: &stubClusterJoiner{},
|
||||
nodeLock: newFakeLock(),
|
||||
disk: &stubDisk{},
|
||||
wantLock: true,
|
||||
},
|
||||
"on control plane: issueJoinTicket errors": {
|
||||
role: role.ControlPlane,
|
||||
apiAnswers: []any{
|
||||
@ -204,18 +188,6 @@ func TestClient(t *testing.T) {
|
||||
wantLock: true,
|
||||
wantNumJoins: 2,
|
||||
},
|
||||
"on control plane: no CA derivation key is given": {
|
||||
role: role.ControlPlane,
|
||||
apiAnswers: []any{
|
||||
selfAnswer{instance: controlSelf},
|
||||
listAnswer{instances: peers},
|
||||
issueJoinTicketAnswer{},
|
||||
},
|
||||
clusterJoiner: &stubClusterJoiner{numBadCalls: 1, joinClusterErr: assert.AnError},
|
||||
nodeLock: newFakeLock(),
|
||||
disk: &stubDisk{},
|
||||
wantLock: true,
|
||||
},
|
||||
"on control plane: node already locked": {
|
||||
role: role.ControlPlane,
|
||||
apiAnswers: []any{
|
||||
|
Loading…
x
Reference in New Issue
Block a user