mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-23 21:54:23 -04:00
aws: name instances for CCM
This commit is contained in:
parent
0d0191ba4d
commit
1f9a788c21
2 changed files with 3 additions and 24 deletions
|
@ -47,12 +47,11 @@ func TestSelf(t *testing.T) {
|
|||
},
|
||||
},
|
||||
tags: map[string]string{
|
||||
tagName: "test-instance",
|
||||
cloud.TagRole: "controlplane",
|
||||
},
|
||||
},
|
||||
wantSelf: metadata.InstanceMetadata{
|
||||
Name: "test-instance",
|
||||
Name: "test-instance-id",
|
||||
ProviderID: "aws:///test-zone/test-instance-id",
|
||||
Role: role.ControlPlane,
|
||||
VPCIP: "192.0.2.1",
|
||||
|
@ -68,12 +67,11 @@ func TestSelf(t *testing.T) {
|
|||
},
|
||||
},
|
||||
tags: map[string]string{
|
||||
tagName: "test-instance",
|
||||
cloud.TagRole: "worker",
|
||||
},
|
||||
},
|
||||
wantSelf: metadata.InstanceMetadata{
|
||||
Name: "test-instance",
|
||||
Name: "test-instance-id",
|
||||
ProviderID: "aws:///test-zone/test-instance-id",
|
||||
Role: role.Worker,
|
||||
VPCIP: "192.0.2.1",
|
||||
|
@ -102,21 +100,6 @@ func TestSelf(t *testing.T) {
|
|||
},
|
||||
wantErr: true,
|
||||
},
|
||||
"name not set": {
|
||||
imds: &stubIMDS{
|
||||
instanceDocumentResp: &imds.GetInstanceIdentityDocumentOutput{
|
||||
InstanceIdentityDocument: imds.InstanceIdentityDocument{
|
||||
InstanceID: "test-instance-id",
|
||||
AvailabilityZone: "test-zone",
|
||||
PrivateIP: "192.0.2.1",
|
||||
},
|
||||
},
|
||||
tags: map[string]string{
|
||||
cloud.TagRole: "controlplane",
|
||||
},
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
"role not set": {
|
||||
imds: &stubIMDS{
|
||||
instanceDocumentResp: &imds.GetInstanceIdentityDocumentOutput{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue