Skip to content

Remove the failing integration tests #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class FirebaseProjectManagementIT {
"Created By Firebase AdminSDK Java Integration Testing";
private static final String TEST_APP_BUNDLE_ID = "com.firebase.adminsdk-java-integration-test";
private static final String TEST_APP_PACKAGE_NAME = "com.firebase.adminsdk_java_integration_test";
private static final String TEST_SHA1_CERTIFICATE = "1111111111111111111111111111111111111111";
// Commenting out SHA1 tests until we have a fix for b/185268518
// private static final String TEST_SHA1_CERTIFICATE = "1111111111111111111111111111111111111111";
private static final String TEST_SHA256_CERTIFICATE =
"AAAACCCCAAAACCCCAAAACCCCAAAACCCCAAAACCCCAAAACCCCAAAACCCCAAAACCCC";
private static final Random random = new Random();
Expand Down Expand Up @@ -120,28 +121,29 @@ public void testAndroidCertificates() throws Exception {
FirebaseProjectManagement projectManagement = FirebaseProjectManagement.getInstance();
AndroidApp androidApp = projectManagement.getAndroidApp(testAndroidAppId);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just comment out instead of removing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Let's comment it out for now. Thanks!

// Use the Synchronous version of the API.
{
// Add SHA-1 certificate.
androidApp.createShaCertificate(ShaCertificate.create(TEST_SHA1_CERTIFICATE));
List<ShaCertificate> certificates = androidApp.getShaCertificates();
ShaCertificate expectedCertificate = null;
for (ShaCertificate certificate : certificates) {
if (certificate.getShaHash().equals(TEST_SHA1_CERTIFICATE.toLowerCase())) {
expectedCertificate = certificate;
}
}
assertNotNull(expectedCertificate);
assertEquals(expectedCertificate.getCertType(), ShaCertificateType.SHA_1);

// Delete SHA-1 certificate.
androidApp.deleteShaCertificate(expectedCertificate);
for (ShaCertificate certificate : androidApp.getShaCertificates()) {
if (certificate.getShaHash().equals(TEST_SHA1_CERTIFICATE)) {
fail("Test SHA-1 certificate is not deleted.");
}
}
}
// Commenting out SHA1 tests until we have a fix for b/185268518
// // Use the Synchronous version of the API.
// {
// // Add SHA-1 certificate.
// androidApp.createShaCertificate(ShaCertificate.create(TEST_SHA1_CERTIFICATE));
// List<ShaCertificate> certificates = androidApp.getShaCertificates();
// ShaCertificate expectedCertificate = null;
// for (ShaCertificate certificate : certificates) {
// if (certificate.getShaHash().equals(TEST_SHA1_CERTIFICATE.toLowerCase())) {
// expectedCertificate = certificate;
// }
// }
// assertNotNull(expectedCertificate);
// assertEquals(expectedCertificate.getCertType(), ShaCertificateType.SHA_1);
//
// // Delete SHA-1 certificate.
// androidApp.deleteShaCertificate(expectedCertificate);
// for (ShaCertificate certificate : androidApp.getShaCertificates()) {
// if (certificate.getShaHash().equals(TEST_SHA1_CERTIFICATE)) {
// fail("Test SHA-1 certificate is not deleted.");
// }
// }
// }

// Use the asynchronous version of the API.
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public static void setUpClass() {
remoteConfig = FirebaseRemoteConfig.getInstance(IntegrationTestUtils.ensureDefaultApp());
}

@Test
public void testToTriggerNightlyEmailNotifications() {
assertEquals("a", "b");
}

@Test
public void testValidateTemplate() throws FirebaseRemoteConfigException {
final Template inputTemplate = remoteConfig.getTemplate();
Expand Down