test: re-enable checkForUpdatesCommand local server / CDN specs#297
Merged
Conversation
- Bump Quick to v5.0.1 and Nimble to v9.2.1 (last versions with full Objective-C QuickSpec DSL compatibility) - SWIFT_VERSION 3.0 -> 5.0 - Disable -Werror at the project level so vendored ReactiveCocoa 2.x builds against modern clang - Bump deployment target to 10.13 (libarclite no longer ships for older) - TestApplication: ad-hoc sign instead of requiring the GitHub team cert - Regenerate signed test fixtures at build time so SQRLCodeSignature cross-validates regardless of host machine - Update specs for Quick 5 ObjC API (QCKConfiguration, qck_beforeSuite, before/afterEachWithMetadata:) - SQRLUpdaterSpec: write update zips to per-test temp dir, swizzle isRunningOnReadOnlyVolume under xctest CLI host, fix env-var typing for NSWorkspace, xit prune-after-update test (behavior intentionally removed in 7dffc4b) - SQRLDirectoryManagerSpec: derive expected identifier from main bundle - Disable manual local-server scheme env vars by default - Add script/test wrapper
Travis only ever built the framework; the new workflow builds and runs the test suite on macos-latest. xcbeautify is preinstalled on the runner image.
TestApplication is ad-hoc signed now, so the encrypted GitHub team certificate and the keychain import dance are dead code.
The vendored xcconfigs (0.8.1, circa 2015) set VALID_ARCHS=x86_64 in Mac-Base.xcconfig, so all Squirrel targets were x86_64-only while Quick/Nimble built for the host arch. On arm64 runners this meant implicit dependency detection couldn't match Nimble.framework and the test target failed with 'no such module'. - VALID_ARCHS = arm64 x86_64 at the project level and on the CLI - ONLY_ACTIVE_ARCH=YES + explicit -destination so everything builds for the host arch - Quick-macOS / Nimble-macOS added as explicit scheme buildables (buildForTesting only) so they're always in the dependency graph - parallelizeBuildables=NO so the Swift-generated headers exist before SquirrelTests starts dependency-scanning
These were no-ops because the swizzled implementations were never restored, breaking later in-process specs. Move the swizzling and OHHTTPStubs registration into beforeEach, capture the original IMPs, and restore both via cleanup. Also return [RACSignal empty] from the stub instead of nil so the command chain completes cleanly.
f7bdf84 to
85ac37f
Compare
MarshallOfSound
added a commit
that referenced
this pull request
May 2, 2026
…hs (#299) Stacked on #298. Fills gaps between this suite and `electron/spec/api-autoupdater-darwin-spec.ts` for behaviors that already exist in `Squirrel/` source. **56 → 63 tests, 0 failures.** #### Added (`SQRLUpdaterSpec.m`) - `checkForUpdatesCommand` → 204 No Content treated as no-update - `checkForUpdatesCommand` → custom request headers reach the server - `checkForUpdatesCommand` JSONFILE mode → picks matching release's `updateTo` when `currentRelease` is newer - `checkForUpdatesCommand` JSONFILE mode → no download when `currentRelease` == running version - `checkForUpdatesCommand` JSONFILE mode → no download when `currentRelease` < running version - `checkForUpdatesCommand` JSONFILE mode → invalid body → `SQRLUpdaterErrorInvalidServerBody` - `response handling` → download endpoint non-2xx → error Also re-enables the `SQUIRREL_TEST_LOCAL_CDN` / `_SERVER` scheme env vars (dropped in the #297 squash). #### Skipped (blocked on patch upstream — separate PRs incoming) - `ElectronSquirrelPreventDowngrades` (4 specs) - prune orphaned staged updates / bounded count / `quitAndInstall` race - `SquirrelMacEnableDirectContentsWrite` - abort-if-app-still-running - nested-code strict-validate failures - zip-extract launch failure
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #296.
These two specs were already in the suite but only ran their bodies when
SQUIRREL_TEST_LOCAL_SERVER/SQUIRREL_TEST_LOCAL_CDNwere set — and #296 disabled those env vars in the scheme because the swizzledupdateFromJSONData:was never restored, which broke later in-process specs.This makes them safe to run unconditionally:
beforeEach, originalIMPs captured and restored viaaddCleanupBlock[RACSignal empty]instead ofnilso the command chain completes cleanlyisEnabled="YES"56 tests, 0 failures, both specs now actually exercise the HTTP path.