-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PF-469 Add subnetworks.list and zones.get GCE operations. (#82)
- Loading branch information
Showing
7 changed files
with
160 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = 0.7.0 | ||
version = 0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = 0.6.0 | ||
version = 0.6.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 21 additions & 19 deletions
40
google-iam/src/test/java/bio/terra/cloudres/google/iam/ServiceAccountNameTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
package bio.terra.cloudres.google.iam; | ||
|
||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
|
||
@Tag("unit") | ||
public class ServiceAccountNameTest { | ||
@Test | ||
public void name() { | ||
String name = "projects/my-project/serviceAccounts/[email protected]"; | ||
ServiceAccountName serviceAccountName = ServiceAccountName.fromNameFormat(name); | ||
@Test | ||
public void name() { | ||
String name = "projects/my-project/serviceAccounts/[email protected]"; | ||
ServiceAccountName serviceAccountName = ServiceAccountName.fromNameFormat(name); | ||
|
||
assertEquals("my-project", serviceAccountName.projectId()); | ||
assertEquals("[email protected]", serviceAccountName.email()); | ||
assertEquals(name, serviceAccountName.formatName()); | ||
} | ||
assertEquals("my-project", serviceAccountName.projectId()); | ||
assertEquals("[email protected]", serviceAccountName.email()); | ||
assertEquals(name, serviceAccountName.formatName()); | ||
} | ||
|
||
@Test | ||
public void invalidName() { | ||
assertThrows(IllegalArgumentException.class, () -> ServiceAccountName.fromNameFormat("foo")); | ||
} | ||
@Test | ||
public void invalidName() { | ||
assertThrows(IllegalArgumentException.class, () -> ServiceAccountName.fromNameFormat("foo")); | ||
} | ||
|
||
@Test | ||
public void emailAccountId() { | ||
assertEquals("[email protected]", ServiceAccountName.emailFromAccountId("foo", "my-project")); | ||
} | ||
@Test | ||
public void emailAccountId() { | ||
assertEquals( | ||
"[email protected]", | ||
ServiceAccountName.emailFromAccountId("foo", "my-project")); | ||
} | ||
} |