GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: mock getOsName in isOnGce_forbidden_doesNotRetry to avoid CI en… · googleapis/google-cloud-java@fe14912

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2
    • ComputeEngineCredentialsTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/ComputeEngineCredentialsTest.java‎

Copy file name to clipboardExpand all lines: google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/ComputeEngineCredentialsTest.java
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,12 @@ void getProjectId_explicitSet_noMDsCall() {
11811181
void isOnGce_forbidden_doesNotRetry() {
11821182
MockMetadataServerTransportFactory transportFactory = new MockMetadataServerTransportFactory();
11831183
transportFactory.transport.setStatusCode(HttpStatusCodes.STATUS_CODE_FORBIDDEN);
1184-
DefaultCredentialsProvider provider = new DefaultCredentialsProvider();
1184+
DefaultCredentialsProvider provider = new DefaultCredentialsProvider() {
1185+
@Override
1186+
String getOsName() {
1187+
return "Unknown";
1188+
}
1189+
};
11851190
boolean isOnGce = ComputeEngineCredentials.isOnGce(transportFactory, provider);
11861191
assertFalse(isOnGce);
11871192
assertEquals(1, transportFactory.transport.getRequestCount());

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.