Skip to content

Commit

Permalink
fix: do not use GAE_RUNTIME for GAE environment detection (#891)
Browse files Browse the repository at this point in the history
Stops using GAE_RUNTIME envvar to detect AppEngine environment.
  • Loading branch information
minherz authored Mar 2, 2022
1 parent fa8b41d commit 19e9abb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ private static Resource detectResourceType() {
return Resource.CloudRun;
}
if (getter.getEnv("GAE_INSTANCE") != null
&& getter.getEnv("GAE_RUNTIME") != null
&& getter.getEnv("GAE_SERVICE") != null
&& getter.getEnv("GAE_VERSION") != null) {
return Resource.AppEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public void testResourceTypeK8sContainer() {
private void setupCommonGAEMocks(String mockedModuleId, String mockedVersionId) {
expect(getterMock.getAttribute("instance/zone")).andReturn(MOCKED_QUALIFIED_ZONE).once();
expect(getterMock.getEnv("GAE_INSTANCE")).andReturn(MOCKED_NON_EMPTY).once();
expect(getterMock.getEnv("GAE_RUNTIME")).andReturn(MOCKED_NON_EMPTY).once();
expect(getterMock.getEnv("GAE_SERVICE")).andReturn(mockedModuleId).times(2);
expect(getterMock.getEnv("GAE_VERSION")).andReturn(mockedVersionId).times(2);
expect(getterMock.getEnv(anyString())).andReturn(null).anyTimes();
Expand Down

0 comments on commit 19e9abb

Please sign in to comment.