Skip to content

Commit 0dd771c

Browse files
author
Ace Nassri
authored
chore(functions): use proper Java test naming (GoogleCloudPlatform#4539)
* chore(functions): use proper Java test naming * Rename system tests * Fix inconsistent class names * Fix missed spots
1 parent 4ec765a commit 0dd771c

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

functions/helloworld/hello-gcs/src/test/java/functions/ExampleIntegrationTest.java renamed to functions/helloworld/hello-gcs/src/test/java/functions/ExampleIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import org.junit.BeforeClass;
4444
import org.junit.Test;
4545

46-
public class ExampleIntegrationTest {
46+
public class ExampleIT {
4747
// Root URL pointing to the locally hosted function
4848
// The Functions Framework Maven plugin lets us run a function locally
4949
private static final String BASE_URL = "http://localhost:8080";

functions/helloworld/hello-gcs/src/test/java/functions/ExampleSystemTest.java renamed to functions/helloworld/hello-gcs/src/test/java/functions/ExampleSystemIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.junit.BeforeClass;
4242
import org.junit.Test;
4343

44-
public class ExampleSystemTest {
44+
public class ExampleSystemIT {
4545

4646
// TODO<developer>: set these values (as environment variables)
4747
private static final String PROJECT_ID = System.getenv("GCP_PROJECT");
@@ -104,7 +104,7 @@ public void helloGcs_shouldRunOnGcf() {
104104
.build());
105105
Retry retry = registry.retry(filename);
106106
String logEntry = Retry
107-
.decorateFunction(retry, ExampleSystemTest::getLogEntriesAsString)
107+
.decorateFunction(retry, ExampleSystemIT::getLogEntriesAsString)
108108
.apply(startTimestamp);
109109

110110
// Perform final assertion (to make sure we fail on timeout)

functions/helloworld/hello-http/src/test/java/functions/ExampleIntegrationTest.java renamed to functions/helloworld/hello-http/src/test/java/functions/ExampleIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.junit.runners.JUnit4;
3939

4040
@RunWith(JUnit4.class)
41-
public class ExampleIntegrationTest {
41+
public class ExampleIT {
4242
// Root URL pointing to the locally hosted function
4343
// The Functions Framework Maven plugin lets us run a function locally
4444
private static final String BASE_URL = "http://localhost:8080";

functions/helloworld/hello-http/src/test/java/functions/ExampleSystemTest.java renamed to functions/helloworld/hello-http/src/test/java/functions/ExampleSystemIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.junit.runners.JUnit4;
3030

3131
@RunWith(JUnit4.class)
32-
public class ExampleSystemTest {
32+
public class ExampleSystemIT {
3333
// Root URL pointing to your Cloud Functions deployment
3434
// TODO<developer>: set this value, as an environment variable or within your test code
3535
private static final String BASE_URL = System.getenv("FUNCTIONS_BASE_URL");

functions/helloworld/hello-pubsub/src/test/java/functions/ExampleIntegrationTest.java renamed to functions/helloworld/hello-pubsub/src/test/java/functions/ExampleIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.junit.BeforeClass;
4545
import org.junit.Test;
4646

47-
public class ExampleIntegrationTest {
47+
public class ExampleIT {
4848
// Root URL pointing to the locally hosted function
4949
// The Functions Framework Maven plugin lets us run a function locally
5050
private static final String BASE_URL = "http://localhost:8080";

functions/helloworld/hello-pubsub/src/test/java/functions/ExampleSystemTest.java renamed to functions/helloworld/hello-pubsub/src/test/java/functions/ExampleSystemIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import org.junit.BeforeClass;
4343
import org.junit.Test;
4444

45-
public class ExampleSystemTest {
45+
public class ExampleSystemIT {
4646

4747
// TODO<developer>: set these values (as environment variables)
4848
private static final String PROJECT_ID = System.getenv("GCP_PROJECT");
@@ -108,7 +108,7 @@ public void helloPubSub_shouldRunOnGcf() throws Exception {
108108
.build());
109109
Retry retry = registry.retry(name);
110110
String logEntry = Retry
111-
.decorateFunction(retry, ExampleSystemTest::getLogEntriesAsString)
111+
.decorateFunction(retry, ExampleSystemIT::getLogEntriesAsString)
112112
.apply(startTimestamp);
113113

114114
// Perform final assertion (to make sure we fail on timeout)

0 commit comments

Comments
 (0)