-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from tesonep/issue/870
Adding Metacello Integration tests and fixing the detected problems
- Loading branch information
Showing
75 changed files
with
271 additions
and
44 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
Iceberg-Libgit.package/IceRepositoryCreator.class/instance/addLocalRepository.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
private actions | ||
addLocalRepository | ||
self repository location: self locationToUse. | ||
self repository pluginManager repositoryWillBeCreated: self repository. | ||
self repository pluginManager repositoryWillBeCreated: self repository. | ||
|
||
self repository workingCopy initializePackagesFromRepository. | ||
self doEnsureProject. | ||
|
||
self repository pluginManager repositoryWasCreated: self repository. | ||
^ self repository |
This file contains 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
15 changes: 15 additions & 0 deletions
15
Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
private | ||
doEnsureProject | ||
|
||
| fileFormat | | ||
|
||
ensureProjectFile ifFalse: [ ^ self ]. | ||
self repository project isUnbornProject ifFalse: [ ^ self ]. | ||
|
||
fileFormat := self repository project fileFormat. | ||
|
||
self repository workingCopy project: | ||
((IceProject onRepository: self repository) | ||
fileFormat: fileFormat; | ||
sourceDirectory: self subdirectory; | ||
yourself) |
3 changes: 3 additions & 0 deletions
3
Iceberg-Libgit.package/IceRepositoryCreator.class/instance/ensureProjectFile.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
API-project | ||
ensureProjectFile | ||
ensureProjectFile := true |
4 changes: 4 additions & 0 deletions
4
Iceberg-Libgit.package/IceRepositoryCreator.class/instance/initialize.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
ensureProjectFile := false |
This file contains 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
5 changes: 5 additions & 0 deletions
5
Iceberg-Libgit.package/IceRepositoryProperties.class/class/empty.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
requirements | ||
empty | ||
^ self new | ||
properties: Dictionary new; | ||
yourself |
4 changes: 4 additions & 0 deletions
4
Iceberg-Libgit.package/IceRepositoryProperties.class/instance/^equals.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
comparing | ||
= anotherObject | ||
|
||
^ self species = anotherObject species and: [ properties = anotherObject properties ] |
3 changes: 3 additions & 0 deletions
3
Iceberg-Libgit.package/IceRepositoryProperties.class/instance/hash.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
comparing | ||
hash | ||
^ properties hash |
3 changes: 3 additions & 0 deletions
3
Iceberg-Memory.package/IceMemoryProject.class/instance/isDirty.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
isDirty | ||
^ repository workingCopy referenceCommit project ~= self |
1 change: 1 addition & 0 deletions
1
...tegration.package/IceMetacelloPharoPlatform.class/instance/extractTypeFromDescription..st
This file contains 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
8 changes: 8 additions & 0 deletions
8
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishConfiguration.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
testing | ||
commitishConfiguration | ||
|
||
^ IceTestParameter | ||
withOptions: self commitishOptions | ||
on: self | ||
selector: #commitishToUse | ||
|
7 changes: 7 additions & 0 deletions
7
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishOptions.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
testing | ||
commitishOptions | ||
|
||
^ { ''. "Without commitish" | ||
':forBecomeWriteable'. "With branch" | ||
':1.2.3'. "with tag"} | ||
|
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse..st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
commitishToUse: aValue | ||
|
||
CommitishToUse := aValue |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
testing | ||
commitishToUse | ||
|
||
^ CommitishToUse ifNil: [ '' ] |
3 changes: 1 addition & 2 deletions
3
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/isAbstract.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
testing | ||
isAbstract | ||
|
||
^ self == IceMetacelloIntegrationTests | ||
^ self name = #IceMetacelloIntegrationTests |
3 changes: 2 additions & 1 deletion
3
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/parameters.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
testing | ||
parameters | ||
|
||
^ { self remoteTypeConfiguration } | ||
^ { self remoteTypeConfiguration. | ||
self commitishConfiguration } |
3 changes: 3 additions & 0 deletions
3
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/defaultTimeLimit.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
defaultTimeLimit | ||
^ 30 seconds |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/expectedFileFormat.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
expectedFileFormat | ||
|
||
^ self subclassResponsibility |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/hasProject.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
hasProject | ||
|
||
^ self subclassResponsibility |
5 changes: 4 additions & 1 deletion
5
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
tests | ||
installBaseline | ||
|
||
self subclassResponsibility | ||
Metacello new | ||
baseline: 'PharoGitTest'; | ||
repository: (self repository , self class commitishToUse); | ||
load. |
2 changes: 1 addition & 1 deletion
2
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoriesForTest.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tests | ||
repositoriesForTest | ||
|
||
^ IceRepository registry select: [ :e | e name = 'pharo-git-test' ] | ||
^ IceRepository registry select: [ :e | e name = self repositoryName ] |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repository.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
repository | ||
|
||
^ 'github://pharo-vcs/' , self repositoryName |
2 changes: 1 addition & 1 deletion
2
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryForTest.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tests | ||
repositoryForTest | ||
|
||
^ IceRepository registry detect: [ :e | e name = 'pharo-git-test' ] | ||
^ IceRepository registry detect: [ :e | e name = self repositoryName ] |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryName.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
repositoryName | ||
|
||
^ self subclassResponsibility |
4 changes: 4 additions & 0 deletions
4
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/shouldBeDirty.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
shouldBeDirty | ||
|
||
^ false |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
6 changes: 3 additions & 3 deletions
6
...s.class/instance/testProjectIsNotDirty.st → ...ts.class/instance/testProjectDirtiness.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
tests | ||
testProjectIsNotDirty | ||
testProjectDirtiness | ||
|
||
"Avoid this test if on ssh on the CI" | ||
(self isTestingSSH and: [ self isCI ]) | ||
ifTrue: [ ^ self skip ]. | ||
|
||
self installBaseline. | ||
repository := self repositoryForTest. | ||
self deny: repository isModified | ||
|
||
self assert: repository isModified equals: self shouldBeDirty |
11 changes: 11 additions & 0 deletions
11
Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectFileFormat.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests | ||
testProjectFileFormat | ||
|
||
"Avoid this test if on ssh on the CI" | ||
(self isTestingSSH and: [ self isCI ]) | ||
ifTrue: [ ^ self skip ]. | ||
|
||
self installBaseline. | ||
repository := self repositoryForTest. | ||
|
||
self assert: repository project fileFormat equals: self expectedFileFormat. |
11 changes: 11 additions & 0 deletions
11
...erg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests | ||
testProjectHasDescriptor | ||
|
||
"Avoid this test if on ssh on the CI" | ||
(self isTestingSSH and: [ self isCI ]) | ||
ifTrue: [ ^ self skip ]. | ||
|
||
self installBaseline. | ||
repository := self repositoryForTest. | ||
|
||
self assert: repository project isUnbornProject equals: self hasProject not. |
This file contains 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
7 changes: 0 additions & 7 deletions
7
...rg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/instance/installBaseline.st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...sts.package/IceMetacelloIntegrationWithDefaultHEADTests.class/instance/installBaseline.st
This file was deleted.
Oops, something went wrong.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...sts.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/class/commitishOptions.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
testing | ||
commitishOptions | ||
|
||
^ super commitishOptions , { ':61024d7e81eac0b752ade9f3e03f6e2bd34ee5bf' "With commit"} | ||
|
3 changes: 3 additions & 0 deletions
3
...ackage/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/expectedFileFormat.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
configuring | ||
expectedFileFormat | ||
^ IceLibgitFiletreeWriter |
4 changes: 4 additions & 0 deletions
4
...-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/hasProject.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
hasProject | ||
|
||
^ true |
4 changes: 4 additions & 0 deletions
4
...ts.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/repositoryName.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
repositoryName | ||
|
||
^ 'pharo-git-test-withProject-and-noSource' |
4 changes: 4 additions & 0 deletions
4
...sts.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/shouldBeDirty.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
shouldBeDirty | ||
|
||
^ false |
This file contains 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
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
...Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/class/commitishOptions.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
testing | ||
commitishOptions | ||
|
||
^ super commitishOptions , { | ||
':30c9f38109f437d184b4017e7d9da9d953266e8b'. "With commit" | ||
"Adding the src directory" | ||
'/src'. "Without commitish" | ||
':forBecomeWriteable/src'. "With branch" | ||
':1.2.3/src'. "with tag" | ||
':30c9f38109f437d184b4017e7d9da9d953266e8b/src'. "With commit" } | ||
|
||
|
||
|
3 changes: 3 additions & 0 deletions
3
....package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/expectedFileFormat.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
configuring | ||
expectedFileFormat | ||
^ IceLibgitFiletreeWriter |
4 changes: 4 additions & 0 deletions
4
...rg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/hasProject.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
hasProject | ||
|
||
^ true |
4 changes: 4 additions & 0 deletions
4
...ests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/repositoryName.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
repositoryName | ||
|
||
^ 'pharo-git-test-withProject-and-source' |
4 changes: 4 additions & 0 deletions
4
...Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/shouldBeDirty.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
configuring | ||
shouldBeDirty | ||
|
||
^ false |
This file contains 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
Oops, something went wrong.