Graphley / app / Tests / AnalyticsKitTests / LiveTests.swift
| 1 | import XCTest |
| 2 | @testable import AnalyticsKit |
| 3 | |
| 4 | /// Network checks, run only with GRAPHLEY_LIVE=1. |
| 5 | final class LiveTests: XCTestCase { |
| 6 | func testRatingsPull() async throws { |
| 7 | try XCTSkipUnless(ProcessInfo.processInfo.environment["GRAPHLEY_LIVE"] == "1") |
| 8 | for _ in 0..<3 { |
| 9 | let r = try await AppStoreRatings().pull(seed: ["6746770199", "6821642700"]) |
| 10 | XCTAssertFalse(r.names.isEmpty) |
| 11 | } |
| 12 | } |
| 13 | func testSocialsPull() async throws { |
| 14 | try XCTSkipUnless(ProcessInfo.processInfo.environment["GRAPHLEY_LIVE"] == "1") |
| 15 | let r = await Socials().pull(accounts: Portfolio.socials.filter { $0.platform == .youtube || $0.platform == .github }) |
| 16 | print("SOCIALS", r.updated, r.failed, r.videos.count) |
| 17 | } |
| 18 | } |