From da64fae690fc1143ce0fb0d007424d2ba3912275 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 3 Jul 2019 15:41:37 -0700 Subject: [PATCH] test: disable IAP tests that hit Apple servers (#19100) --- spec/api-in-app-purchase-spec.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/api-in-app-purchase-spec.js b/spec/api-in-app-purchase-spec.js index b241e4a1fdb..816fc706b70 100644 --- a/spec/api-in-app-purchase-spec.js +++ b/spec/api-in-app-purchase-spec.js @@ -38,17 +38,22 @@ describe('inAppPurchase module', function () { expect(correctUrlEnd).to.be.true() }) - it('purchaseProduct() fails when buying invalid product', async () => { + // The following three tests are disabled because they hit Apple servers, and + // Apple started blocking requests from AWS IPs (we think), so they fail on + // CI. + // TODO: find a way to mock out the server requests so we can test these APIs + // without relying on a remote service. + xit('purchaseProduct() fails when buying invalid product', async () => { const success = await inAppPurchase.purchaseProduct('non-exist', 1) expect(success).to.be.false() }) - it('purchaseProduct() accepts optional arguments', async () => { + xit('purchaseProduct() accepts optional arguments', async () => { const success = await inAppPurchase.purchaseProduct('non-exist') expect(success).to.be.false() }) - it('getProducts() returns an empty list when getting invalid product', async () => { + xit('getProducts() returns an empty list when getting invalid product', async () => { const products = await inAppPurchase.getProducts(['non-exist']) expect(products).to.be.an('array').of.length(0) })