mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-05 21:44:15 -04:00
AB#2286 Return only primary IPs for instance metadata operations (#335)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
5c00dafe9b
commit
4151d365fb
21 changed files with 180 additions and 185 deletions
|
@ -18,7 +18,7 @@ func TestList(t *testing.T) {
|
|||
{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ func TestList(t *testing.T) {
|
|||
{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -113,13 +113,13 @@ func TestSelf(t *testing.T) {
|
|||
retrieveInstanceValue: metadata.InstanceMetadata{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
},
|
||||
wantInstance: metadata.InstanceMetadata{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
},
|
||||
"retrieve error is detected": {
|
||||
|
@ -186,13 +186,13 @@ func TestGetInstance(t *testing.T) {
|
|||
retrieveInstanceValue: metadata.InstanceMetadata{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
},
|
||||
wantInstance: metadata.InstanceMetadata{
|
||||
Name: "someInstance",
|
||||
ProviderID: "gce://someProject/someZone/someInstance",
|
||||
PrivateIPs: []string{"192.0.2.0"},
|
||||
VPCIP: "192.0.2.0",
|
||||
},
|
||||
},
|
||||
"retrieve error is detected": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue