Pharo test defects

Package: GitHub-Pharo-API (Evref-BL/GitHub-Pharo-API, row 104)

State
Fixed (package repair)
Defect in
see the record
Tests
0
Fix
evref-bl-github-pharo-api.st
Upstream repository
Evref-BL/GitHub-Pharo-API

The record is the text of the repair. The Results table is the last run of the row.

Record

Test

Load the package into a Pharo 14 image (build 791) with the load expression of the test run, file in the fixes file of the row if there is one, and run the test classes of the package.

"row 104"
Metacello new baseline: 'GithubAPI'; repository: 'github://Evref-BL/Github-Pharo-API:main/src'; onConflict: [:e | e useIncoming]; load: #('default').

Results

Last result of the package run (stock Cog and iospharo on the same image).

RowLabelLoadStock Cogiospharo VM
104evref-bl-github-pharo-apioktests=50 P=50 F=0 E=0 S=0 T=0 X=0tests=50 P=50 F=0 E=0 S=0 T=0 X=0

Fix

Fixes file (filed in after the load): evref-bl-github-pharo-api.st (download)
"Evref-BL/Github-Pharo-API: GithubUsersTest>>testGet, testGetUnknowUsers and
testGetUserId were copied from the tests of Evref-BL/Gitlab-Pharo-API and
still build their API object with 'GitlabApi new'.  The Github baseline does
not load GitlabApi (and GitlabApi has no #users that fits).  The class that
the Github package has is GithubApi (users answers GithubUsers).  The sibling
tests (GithubOrganizationsTest and others) use GithubApi with the same
stubbed ZnClient, and they pass.  testGetUsername only sends testGet, so
the same repair fixes that test.  The repair replaces the class name in each
of the three test methods.  No request leaves the image: ZnClient>>get is
stubbed by Mocketry in each test."

Smalltalk globals at: #PkgFixRewrite put: [ :clsName :sel :oldText :newText | | cls |
	cls := resolve value: clsName.
	(cls notNil and: [ cls includesSelector: sel ])
		ifTrue: [
			fix value: clsName value: sel
				value: [ :source | source includesSubstring: oldText ]
				value: ((cls >> sel) sourceCode copyReplaceAll: oldText with: newText) ]
		ifFalse: [ fix value: clsName value: sel value: [ :source | false ] value: '' ] ].

#(testGet testGetUnknowUsers testGetUserId) do: [ :selector |
	(Smalltalk globals at: #PkgFixRewrite) value: #GithubUsersTest value: selector value: 'GitlabApi' value: 'GithubApi' ].
Smalltalk globals removeKey: #PkgFixRewrite ifAbsent: [ nil ].

State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.