From ab4c9b464317d3ffc93d55318b46067742511d5e Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 19 Jun 2018 18:03:13 +0200 Subject: [PATCH 01/17] Adding tests to support combinations with project / src / filetree --- .../instance/extractTypeFromDescription..st | 1 + .../class/commitishConfiguration.st | 8 ++++++++ .../class/commitishOptions.st | 7 +++++++ .../class/commitishToUse..st | 4 ++++ .../class/commitishToUse.st | 4 ++++ .../class/isAbstract.st | 3 +-- .../class/parameters.st | 3 ++- .../instance/hasProject.st | 4 ++++ .../instance/installBaseline.st | 5 ++++- .../instance/repositoriesForTest.st | 2 +- .../instance/repository.st | 4 ++++ .../instance/repositoryForTest.st | 2 +- .../instance/repositoryName.st | 4 ++++ .../instance/tearDown.st | 2 +- ...ConflictingUnrelatedRepositoryInDiskThrowsError.st | 2 +- .../instance/testProjectHasDescriptor.st | 11 +++++++++++ .../properties.json | 4 +++- .../instance/installBaseline.st | 7 ------- .../instance/installBaseline.st | 7 ------- .../properties.json | 11 ----------- .../README.md | 0 .../class/commitishOptions.st | 5 +++++ .../instance/hasProject.st | 4 ++++ .../instance/repositoryName.st | 4 ++++ .../properties.json | 2 +- .../README.md | 0 .../instance/installBaseline.st | 7 ------- .../README.md | 0 .../class/commitishOptions.st | 5 +++++ .../instance/hasProject.st | 4 ++++ .../instance/repositoryName.st | 4 ++++ .../properties.json | 2 +- 32 files changed, 89 insertions(+), 43 deletions(-) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishConfiguration.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishOptions.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse..st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/hasProject.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repository.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryName.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st delete mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/instance/installBaseline.st delete mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/instance/installBaseline.st delete mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/properties.json rename Iceberg-Tests.package/{IceMetacelloIntegrationWithBranchTests.class => IceMetacelloIntegrationWithProjectNorSrcDir.class}/README.md (100%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithTagTests.class => IceMetacelloIntegrationWithProjectNorSrcDir.class}/properties.json (79%) delete mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/README.md delete mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/instance/installBaseline.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithDefaultHEADTests.class => IceMetacelloIntegrationWithoutProjectNorSrcDir.class}/README.md (100%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/class/commitishOptions.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/repositoryName.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithBranchTests.class => IceMetacelloIntegrationWithoutProjectNorSrcDir.class}/properties.json (78%) diff --git a/Iceberg-Metacello-Integration.package/IceMetacelloPharoPlatform.class/instance/extractTypeFromDescription..st b/Iceberg-Metacello-Integration.package/IceMetacelloPharoPlatform.class/instance/extractTypeFromDescription..st index a77dfd803d..fdb2b6c55d 100644 --- a/Iceberg-Metacello-Integration.package/IceMetacelloPharoPlatform.class/instance/extractTypeFromDescription..st +++ b/Iceberg-Metacello-Integration.package/IceMetacelloPharoPlatform.class/instance/extractTypeFromDescription..st @@ -1,5 +1,6 @@ repository creation extractTypeFromDescription: description + (description beginsWith: 'ftp://') ifTrue: [ ^'ftp' ]. IceMetacelloRepositoryType allTypes detect: [ :each | each isSuitableForLocation: description ] diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishConfiguration.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishConfiguration.st new file mode 100644 index 0000000000..f082dc5b27 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishConfiguration.st @@ -0,0 +1,8 @@ +testing +commitishConfiguration + + ^ IceTestParameter + withOptions: self commitishOptions + on: self + selector: #commitishToUse + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishOptions.st new file mode 100644 index 0000000000..6caf27e595 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishOptions.st @@ -0,0 +1,7 @@ +testing +commitishOptions + + ^ { ''. "Without commitish" + ':forBecomeWriteable'. "With branch" + ':1.2.3'. "with tag"} + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse..st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse..st new file mode 100644 index 0000000000..5b91d15d3d --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse..st @@ -0,0 +1,4 @@ +testing +commitishToUse: aValue + + CommitishToUse := aValue \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st new file mode 100644 index 0000000000..8602fa4ee6 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st @@ -0,0 +1,4 @@ +testing +commitishToUse + + ^ CommitishToUse \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/isAbstract.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/isAbstract.st index 28bdc9c919..940fda4fd6 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/isAbstract.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/isAbstract.st @@ -1,4 +1,3 @@ testing isAbstract - - ^ self == IceMetacelloIntegrationTests \ No newline at end of file + ^ self name = #IceMetacelloIntegrationTests \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/parameters.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/parameters.st index 251b13baa6..dbffa385b2 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/parameters.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/parameters.st @@ -1,4 +1,5 @@ testing parameters - ^ { self remoteTypeConfiguration } \ No newline at end of file + ^ { self remoteTypeConfiguration. + self commitishConfiguration } \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/hasProject.st new file mode 100644 index 0000000000..e769e1f288 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/hasProject.st @@ -0,0 +1,4 @@ +configuring +hasProject + + ^ self subclassResponsibility \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st index f8dca93013..d2f8146d9f 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st @@ -1,4 +1,7 @@ tests installBaseline - self subclassResponsibility \ No newline at end of file + Metacello new + baseline: 'PharoGitTest'; + repository: (self repository , CommitishToUse); + load. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoriesForTest.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoriesForTest.st index 035784ccaf..748880341f 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoriesForTest.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoriesForTest.st @@ -1,4 +1,4 @@ tests repositoriesForTest - ^ IceRepository registry select: [ :e | e name = 'pharo-git-test' ] \ No newline at end of file + ^ IceRepository registry select: [ :e | e name = self repositoryName ] \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repository.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repository.st new file mode 100644 index 0000000000..bc021d4943 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repository.st @@ -0,0 +1,4 @@ +configuring +repository + + ^ 'github://pharo-vcs/' , self repositoryName \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryForTest.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryForTest.st index 70f1a2c4d9..fbad09c638 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryForTest.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryForTest.st @@ -1,4 +1,4 @@ tests repositoryForTest - ^ IceRepository registry detect: [ :e | e name = 'pharo-git-test' ] \ No newline at end of file + ^ IceRepository registry detect: [ :e | e name = self repositoryName ] \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryName.st new file mode 100644 index 0000000000..9899470bd8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/repositoryName.st @@ -0,0 +1,4 @@ +configuring +repositoryName + + ^ self subclassResponsibility \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/tearDown.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/tearDown.st index b355f2c8e9..eab86b628f 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/tearDown.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/tearDown.st @@ -14,7 +14,7 @@ tearDown "Remove temporary repository just in case" 'temp/test' asFileReference ensureDeleteAll. - (IceLibgitRepository localRepositoriesLocation/'pharo-vcs/pharo-git-test') ensureDeleteAll. + (IceLibgitRepository localRepositoriesLocation/'pharo-vcs'/self repositoryName) ensureDeleteAll. super tearDown. diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWithConflictingUnrelatedRepositoryInDiskThrowsError.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWithConflictingUnrelatedRepositoryInDiskThrowsError.st index cc1c79c8e6..450f69f53f 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWithConflictingUnrelatedRepositoryInDiskThrowsError.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWithConflictingUnrelatedRepositoryInDiskThrowsError.st @@ -5,6 +5,6 @@ testInstallBaselineWithConflictingUnrelatedRepositoryInDiskThrowsError (self isTestingSSH and: [ self isCI ]) ifTrue: [ ^ self skip ]. - self createConflictingRepositoryIn: IceLibgitRepository localRepositoriesLocation/'pharo-vcs/pharo-git-test'. + self createConflictingRepositoryIn: IceLibgitRepository localRepositoriesLocation/ 'pharo-vcs' / self repositoryName. self should: [ self installBaseline ] raise: IceMetacelloDuplicatedNotification \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st new file mode 100644 index 0000000000..9665fdfaf8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st @@ -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 isUnborn equals: self hasProject not. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/properties.json index 7111d07919..055860f94a 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/properties.json +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/properties.json @@ -4,7 +4,9 @@ "category" : "Iceberg-Tests-MetacelloIntegration", "classinstvars" : [ ], "pools" : [ ], - "classvars" : [ ], + "classvars" : [ + "CommitishToUse" + ], "instvars" : [ "repository", "conflictingRepository" diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/instance/installBaseline.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/instance/installBaseline.st deleted file mode 100644 index 482a4d4fb4..0000000000 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/instance/installBaseline.st +++ /dev/null @@ -1,7 +0,0 @@ -tests -installBaseline - - Metacello new - baseline: 'PharoGitTest'; - repository: 'github://pharo-vcs/pharo-git-test:forBecomeWriteable'; - load. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/instance/installBaseline.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/instance/installBaseline.st deleted file mode 100644 index 075e4df970..0000000000 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/instance/installBaseline.st +++ /dev/null @@ -1,7 +0,0 @@ -tests -installBaseline - - Metacello new - baseline: 'PharoGitTest'; - repository: 'github://pharo-vcs/pharo-git-test'; - load \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/properties.json deleted file mode 100644 index 6abfc8bfd7..0000000000 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "", - "super" : "IceMetacelloIntegrationTests", - "category" : "Iceberg-Tests-MetacelloIntegration", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "IceMetacelloIntegrationWithDefaultHEADTests", - "type" : "normal" -} \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/README.md similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/README.md rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/README.md diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st new file mode 100644 index 0000000000..eaf8efd6cc --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st @@ -0,0 +1,5 @@ +testing +commitishOptions + + ^ super commitishOptions , { ':61024d7e81eac0b752ade9f3e03f6e2bd34ee5bf' "With commit"} + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st new file mode 100644 index 0000000000..d4a0b52af7 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st @@ -0,0 +1,4 @@ +configuring +hasProject + + ^ true \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st new file mode 100644 index 0000000000..dcb9419a76 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st @@ -0,0 +1,4 @@ +configuring +repositoryName + + ^ 'pharo-git-test-withProject-and-noSource' \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json similarity index 79% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/properties.json rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json index f997f2e22e..1a366862fc 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/properties.json +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json @@ -6,6 +6,6 @@ "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "IceMetacelloIntegrationWithTagTests", + "name" : "IceMetacelloIntegrationWithProjectNorSrcDir", "type" : "normal" } \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/README.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/instance/installBaseline.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/instance/installBaseline.st deleted file mode 100644 index 3764994fcd..0000000000 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithTagTests.class/instance/installBaseline.st +++ /dev/null @@ -1,7 +0,0 @@ -tests -installBaseline - - Metacello new - baseline: 'PharoGitTest'; - repository: 'github://pharo-vcs/pharo-git-test:1.2.3'; - load. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/README.md similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithDefaultHEADTests.class/README.md rename to Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/README.md diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/class/commitishOptions.st new file mode 100644 index 0000000000..1e9642db27 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/class/commitishOptions.st @@ -0,0 +1,5 @@ +testing +commitishOptions + + ^ super commitishOptions , { ':d68a059b2e36672b1103d89689412d37462b9ca2' "With commit"} + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st new file mode 100644 index 0000000000..d9b54f9d2a --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st @@ -0,0 +1,4 @@ +configuring +hasProject + + ^ false \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/repositoryName.st new file mode 100644 index 0000000000..a2d20b25c8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/repositoryName.st @@ -0,0 +1,4 @@ +configuring +repositoryName + + ^ 'pharo-git-test' \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/properties.json similarity index 78% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/properties.json rename to Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/properties.json index efde4d4026..60b1a858a0 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithBranchTests.class/properties.json +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/properties.json @@ -6,6 +6,6 @@ "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "IceMetacelloIntegrationWithBranchTests", + "name" : "IceMetacelloIntegrationWithoutProjectNorSrcDir", "type" : "normal" } \ No newline at end of file From eb4b21bc1e0ed0c2b7ae77b22fdbd58de1ef09d5 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 19 Jun 2018 18:15:51 +0200 Subject: [PATCH 02/17] Fixing the test to run in the CI --- .../IceMetacelloIntegrationTests.class/class/commitishToUse.st | 2 +- .../instance/installBaseline.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st index 8602fa4ee6..c55a4f3998 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/class/commitishToUse.st @@ -1,4 +1,4 @@ testing commitishToUse - ^ CommitishToUse \ No newline at end of file + ^ CommitishToUse ifNil: [ '' ] \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st index d2f8146d9f..c5c7f7f549 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/installBaseline.st @@ -3,5 +3,5 @@ installBaseline Metacello new baseline: 'PharoGitTest'; - repository: (self repository , CommitishToUse); + repository: (self repository , self class commitishToUse); load. \ No newline at end of file From c9343f57dad5fad17ba5a9ea16eecae79df7ed33 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 19 Jun 2018 19:00:27 +0200 Subject: [PATCH 03/17] Fixing tests --- .../instance/testProjectHasDescriptor.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st index 9665fdfaf8..744778da75 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st @@ -8,4 +8,4 @@ testProjectHasDescriptor self installBaseline. repository := self repositoryForTest. - self assert: repository project isUnborn equals: self hasProject not. \ No newline at end of file + self assert: repository project isUnbornProject equals: self hasProject not. \ No newline at end of file From 02634e7999dee94bf43e5a649265192d3310739e Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Wed, 20 Jun 2018 16:00:08 +0200 Subject: [PATCH 04/17] Adding more Metacello Integration tests --- .../instance/defaultTimeLimit.st | 3 +++ .../instance/expectedFileFormat.st | 4 ++++ .../instance/testProjectFileFormat.st | 11 +++++++++++ .../instance/testProjectHasDescriptor.st | 2 +- .../README.md | 0 .../class/commitishOptions.st | 0 .../instance/expectedFileFormat.st | 3 +++ .../instance/hasProject.st | 0 .../instance/repositoryName.st | 0 .../properties.json | 11 +++++++++++ .../README.md | 0 .../class/commitishOptions.st | 13 +++++++++++++ .../instance/expectedFileFormat.st | 3 +++ .../instance/hasProject.st | 4 ++++ .../instance/repositoryName.st | 4 ++++ .../properties.json | 2 +- .../README.md | 0 .../class/commitishOptions.st | 8 ++++++++ .../instance/expectedFileFormat.st | 3 +++ .../instance/hasProject.st | 4 ++++ .../instance/repositoryName.st | 4 ++++ .../properties.json | 11 +++++++++++ .../instance/expectedFileFormat.st | 4 ++++ 23 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/defaultTimeLimit.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/expectedFileFormat.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectFileFormat.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithProjectNorSrcDir.class => IceMetacelloIntegrationWithProjectAndNoSrcDir.class}/README.md (100%) rename Iceberg-Tests.package/{IceMetacelloIntegrationWithProjectNorSrcDir.class => IceMetacelloIntegrationWithProjectAndNoSrcDir.class}/class/commitishOptions.st (100%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/expectedFileFormat.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithProjectNorSrcDir.class => IceMetacelloIntegrationWithProjectAndNoSrcDir.class}/instance/hasProject.st (100%) rename Iceberg-Tests.package/{IceMetacelloIntegrationWithProjectNorSrcDir.class => IceMetacelloIntegrationWithProjectAndNoSrcDir.class}/instance/repositoryName.st (100%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/properties.json create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/README.md create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/class/commitishOptions.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/expectedFileFormat.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/hasProject.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/repositoryName.st rename Iceberg-Tests.package/{IceMetacelloIntegrationWithProjectNorSrcDir.class => IceMetacelloIntegrationWithProjectAndSrcDir.class}/properties.json (79%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/README.md create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishOptions.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/expectedFileFormat.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/repositoryName.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/properties.json create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/expectedFileFormat.st diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/defaultTimeLimit.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/defaultTimeLimit.st new file mode 100644 index 0000000000..09f964ff07 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/defaultTimeLimit.st @@ -0,0 +1,3 @@ +accessing +defaultTimeLimit + ^ 30 seconds \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/expectedFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/expectedFileFormat.st new file mode 100644 index 0000000000..b4d894f10e --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/expectedFileFormat.st @@ -0,0 +1,4 @@ +configuring +expectedFileFormat + + ^ self subclassResponsibility \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectFileFormat.st new file mode 100644 index 0000000000..9144f07e25 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectFileFormat.st @@ -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. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st index 744778da75..03ef9bb6e9 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectHasDescriptor.st @@ -7,5 +7,5 @@ testProjectHasDescriptor self installBaseline. repository := self repositoryForTest. - + self assert: repository project isUnbornProject equals: self hasProject not. \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/README.md similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/README.md rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/README.md diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/class/commitishOptions.st similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/class/commitishOptions.st rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/class/commitishOptions.st diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/expectedFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/expectedFileFormat.st new file mode 100644 index 0000000000..8d50d2bb58 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/expectedFileFormat.st @@ -0,0 +1,3 @@ +configuring +expectedFileFormat + ^ IceLibgitFiletreeWriter \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/hasProject.st similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/hasProject.st rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/hasProject.st diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/repositoryName.st similarity index 100% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/instance/repositoryName.st rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/repositoryName.st diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/properties.json new file mode 100644 index 0000000000..18b41ada2a --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "IceMetacelloIntegrationTests", + "category" : "Iceberg-Tests-MetacelloIntegration", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "IceMetacelloIntegrationWithProjectAndNoSrcDir", + "type" : "normal" +} \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/class/commitishOptions.st new file mode 100644 index 0000000000..9be71e40f1 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/class/commitishOptions.st @@ -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" } + + + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/expectedFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/expectedFileFormat.st new file mode 100644 index 0000000000..8d50d2bb58 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/expectedFileFormat.st @@ -0,0 +1,3 @@ +configuring +expectedFileFormat + ^ IceLibgitFiletreeWriter \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/hasProject.st new file mode 100644 index 0000000000..d4a0b52af7 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/hasProject.st @@ -0,0 +1,4 @@ +configuring +hasProject + + ^ true \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/repositoryName.st new file mode 100644 index 0000000000..382d6e766a --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/repositoryName.st @@ -0,0 +1,4 @@ +configuring +repositoryName + + ^ 'pharo-git-test-withProject-and-source' \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/properties.json similarity index 79% rename from Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json rename to Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/properties.json index 1a366862fc..d001e6d377 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectNorSrcDir.class/properties.json +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/properties.json @@ -6,6 +6,6 @@ "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "IceMetacelloIntegrationWithProjectNorSrcDir", + "name" : "IceMetacelloIntegrationWithProjectAndSrcDir", "type" : "normal" } \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/README.md b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishOptions.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishOptions.st new file mode 100644 index 0000000000..7f7c8d0976 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishOptions.st @@ -0,0 +1,8 @@ +testing +commitishOptions + + ^ { '/src'. "Without commitish" + ':forBecomeWriteable/src'. "With branch" + ':1.2.3/src'. "with tag" + ':087ae347c6c09bf12734e2a52d0e760f5e3eb4d3/src'. "with Commit"} + diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/expectedFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/expectedFileFormat.st new file mode 100644 index 0000000000..8d50d2bb58 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/expectedFileFormat.st @@ -0,0 +1,3 @@ +configuring +expectedFileFormat + ^ IceLibgitFiletreeWriter \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st new file mode 100644 index 0000000000..d9b54f9d2a --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st @@ -0,0 +1,4 @@ +configuring +hasProject + + ^ false \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/repositoryName.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/repositoryName.st new file mode 100644 index 0000000000..1ac21d9dc5 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/repositoryName.st @@ -0,0 +1,4 @@ +configuring +repositoryName + + ^ 'pharo-git-test-withoutProject-and-source' \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/properties.json b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/properties.json new file mode 100644 index 0000000000..520531e17b --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "IceMetacelloIntegrationTests", + "category" : "Iceberg-Tests-MetacelloIntegration", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "IceMetacelloIntegrationWithoutProjectAndSrcDir", + "type" : "normal" +} \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/expectedFileFormat.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/expectedFileFormat.st new file mode 100644 index 0000000000..ee77a413d7 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/expectedFileFormat.st @@ -0,0 +1,4 @@ +configuring +expectedFileFormat + + ^ IceLibgitFiletreeWriter \ No newline at end of file From c427b321030bd03e890be24f3cdf59e94fc61708 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Wed, 20 Jun 2018 16:46:07 +0200 Subject: [PATCH 05/17] Fixing test because SmalltalkCI does not support parametrized tests yet. --- .../class/commitishToUse.st | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishToUse.st diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishToUse.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishToUse.st new file mode 100644 index 0000000000..1d90ada79f --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/class/commitishToUse.st @@ -0,0 +1,4 @@ +testing +commitishToUse + + ^ CommitishToUse ifNil: [ '/src' ] \ No newline at end of file From d0dbdb774e1ab2cb43f3401848134ffa9c92da54 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Wed, 20 Jun 2018 17:11:37 +0200 Subject: [PATCH 06/17] This test should not be skipped --- .../instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st | 1 - 1 file changed, 1 deletion(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st index c85f3581d3..f2d5cb6010 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st @@ -4,7 +4,6 @@ testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS "This test is meant to run in the CI using SSH, when SSH is not available. Other configurations make no sense for this test" self isTestingSSH ifFalse: [ ^ self skip ]. - self isCI ifFalse: [ ^ self skip ]. self installBaseline. repository := self repositoryForTest. From e0edc95d12ff942332d65b0077c2ef79b743d308 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Wed, 20 Jun 2018 18:02:26 +0200 Subject: [PATCH 07/17] Fixing the test to run correctly --- .../testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st index f2d5cb6010..ec9f3ea209 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS.st @@ -3,7 +3,7 @@ testInstallBaselineWhenNoSSHIsAvailableUsesHTTPS "This test is meant to run in the CI using SSH, when SSH is not available. Other configurations make no sense for this test" - self isTestingSSH ifFalse: [ ^ self skip ]. + self isTestingSSH ifTrue: [ ^ self skip ]. self installBaseline. repository := self repositoryForTest. From 73681378546d859d6e8f09b35a2a16560cfed4a1 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 11:43:27 +0200 Subject: [PATCH 08/17] Fix issue #874 Ensure that the repositories created from metacello have a project . Also adds test. --- .../instance/addLocalRepository.st | 5 ++++- .../instance/cloneRepository.st | 3 +++ .../instance/doEnsureProject.st | 15 +++++++++++++++ .../instance/ensureProjectFile.st | 3 +++ .../instance/initialize.st | 4 ++++ .../IceRepositoryCreator.class/properties.json | 3 ++- .../instance/shouldBeDirty.st | 4 ++++ ...ojectIsNotDirty.st => testProjectDirtiness.st} | 4 ++-- .../instance/shouldBeDirty.st | 4 ++++ .../instance/shouldBeDirty.st | 4 ++++ .../instance/shouldBeDirty.st | 4 ++++ .../instance/shouldBeDirty.st | 4 ++++ .../instance/createIcebergRepositoryFor..st | 1 + 13 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st create mode 100644 Iceberg-Libgit.package/IceRepositoryCreator.class/instance/ensureProjectFile.st create mode 100644 Iceberg-Libgit.package/IceRepositoryCreator.class/instance/initialize.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/shouldBeDirty.st rename Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/{testProjectIsNotDirty.st => testProjectDirtiness.st} (68%) create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/shouldBeDirty.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/shouldBeDirty.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/shouldBeDirty.st create mode 100644 Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/shouldBeDirty.st diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/addLocalRepository.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/addLocalRepository.st index 361772805a..96733e596d 100644 --- a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/addLocalRepository.st +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/addLocalRepository.st @@ -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 \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/cloneRepository.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/cloneRepository.st index 03d5c6bfed..43cb4d859d 100644 --- a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/cloneRepository.st +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/cloneRepository.st @@ -10,6 +10,9 @@ cloneRepository self commitishName ifNotNil: [ self repository switchToCommitishNamed: self commitishName ]. self repository pluginManager repositoryWillBeCreated: self repository. + self repository workingCopy initializePackagesFromRepository. + self doEnsureProject. + self repository pluginManager repositoryWasCreated: self repository. ^ self repository \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st new file mode 100644 index 0000000000..526c6c590a --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st @@ -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: subdirectory; + yourself) \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/ensureProjectFile.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/ensureProjectFile.st new file mode 100644 index 0000000000..93064b50cd --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/ensureProjectFile.st @@ -0,0 +1,3 @@ +API-project +ensureProjectFile + ensureProjectFile := true \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/initialize.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/initialize.st new file mode 100644 index 0000000000..db085b5898 --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + ensureProjectFile := false \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/properties.json b/Iceberg-Libgit.package/IceRepositoryCreator.class/properties.json index eb9c717388..968412ac95 100644 --- a/Iceberg-Libgit.package/IceRepositoryCreator.class/properties.json +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/properties.json @@ -11,7 +11,8 @@ "remote", "branchName", "subdirectory", - "repository" + "repository", + "ensureProjectFile" ], "name" : "IceRepositoryCreator", "type" : "normal" diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/shouldBeDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/shouldBeDirty.st new file mode 100644 index 0000000000..509a6b76b8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/shouldBeDirty.st @@ -0,0 +1,4 @@ +configuring +shouldBeDirty + + ^ false \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectIsNotDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st similarity index 68% rename from Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectIsNotDirty.st rename to Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st index f8c8bc635d..3cb23b8332 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectIsNotDirty.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st @@ -1,5 +1,5 @@ tests -testProjectIsNotDirty +testProjectDirtiness "Avoid this test if on ssh on the CI" (self isTestingSSH and: [ self isCI ]) @@ -8,4 +8,4 @@ testProjectIsNotDirty self installBaseline. repository := self repositoryForTest. - self deny: repository isModified \ No newline at end of file + self assert: repository isModified equals: self shouldBeDirty \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/shouldBeDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/shouldBeDirty.st new file mode 100644 index 0000000000..509a6b76b8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndNoSrcDir.class/instance/shouldBeDirty.st @@ -0,0 +1,4 @@ +configuring +shouldBeDirty + + ^ false \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/shouldBeDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/shouldBeDirty.st new file mode 100644 index 0000000000..509a6b76b8 --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithProjectAndSrcDir.class/instance/shouldBeDirty.st @@ -0,0 +1,4 @@ +configuring +shouldBeDirty + + ^ false \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/shouldBeDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/shouldBeDirty.st new file mode 100644 index 0000000000..b4f8a31b5f --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/shouldBeDirty.st @@ -0,0 +1,4 @@ +configuring +shouldBeDirty + + ^ true \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/shouldBeDirty.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/shouldBeDirty.st new file mode 100644 index 0000000000..b4f8a31b5f --- /dev/null +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/shouldBeDirty.st @@ -0,0 +1,4 @@ +configuring +shouldBeDirty + + ^ true \ No newline at end of file diff --git a/Iceberg.package/MCGitBasedNetworkRepository.extension/instance/createIcebergRepositoryFor..st b/Iceberg.package/MCGitBasedNetworkRepository.extension/instance/createIcebergRepositoryFor..st index d877a3311e..5e5ee561dc 100644 --- a/Iceberg.package/MCGitBasedNetworkRepository.extension/instance/createIcebergRepositoryFor..st +++ b/Iceberg.package/MCGitBasedNetworkRepository.extension/instance/createIcebergRepositoryFor..st @@ -6,6 +6,7 @@ createIcebergRepositoryFor: remoteUrl url: remoteUrl; subdirectory: repoPath; commitishName: self projectVersion; + ensureProjectFile; yourself. [ repository := builder createRepository ] From 23aa8db855cbdfe62599bcee0d744d1c72ddf9ed Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 12:10:36 +0200 Subject: [PATCH 09/17] Fixing when the source directory is nil. --- .../IceRepositoryCreator.class/instance/doEnsureProject.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st index 526c6c590a..88c93aa996 100644 --- a/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st +++ b/Iceberg-Libgit.package/IceRepositoryCreator.class/instance/doEnsureProject.st @@ -11,5 +11,5 @@ doEnsureProject self repository workingCopy project: ((IceProject onRepository: self repository) fileFormat: fileFormat; - sourceDirectory: subdirectory; + sourceDirectory: self subdirectory; yourself) \ No newline at end of file From f0c31f2f303e9c5357573cc7ffd33b01ef3e7bd5 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 14:38:21 +0200 Subject: [PATCH 10/17] All the repo have project now. --- .../instance/hasProject.st | 2 +- .../instance/hasProject.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st index d9b54f9d2a..d4a0b52af7 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectAndSrcDir.class/instance/hasProject.st @@ -1,4 +1,4 @@ configuring hasProject - ^ false \ No newline at end of file + ^ true \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st index d9b54f9d2a..d4a0b52af7 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationWithoutProjectNorSrcDir.class/instance/hasProject.st @@ -1,4 +1,4 @@ configuring hasProject - ^ false \ No newline at end of file + ^ true \ No newline at end of file From d20ae96c52def58ab3a645b03b56a158f1d320f6 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 15:58:48 +0200 Subject: [PATCH 11/17] Handling dirtiness when the project is dirty --- .../IceRepositoryProperties.class/class/empty.st | 5 +++++ .../instance/testProjectDirtiness.st | 2 +- Iceberg.package/IceProject.class/instance/initialize.st | 6 +++++- Iceberg.package/IceProject.class/instance/isDirty.st | 3 +++ Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st | 2 +- Iceberg.package/IceWorkingCopy.class/instance/isModified.st | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 Iceberg-Libgit.package/IceRepositoryProperties.class/class/empty.st create mode 100644 Iceberg.package/IceProject.class/instance/isDirty.st diff --git a/Iceberg-Libgit.package/IceRepositoryProperties.class/class/empty.st b/Iceberg-Libgit.package/IceRepositoryProperties.class/class/empty.st new file mode 100644 index 0000000000..bb122c67b3 --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryProperties.class/class/empty.st @@ -0,0 +1,5 @@ +requirements +empty + ^ self new + properties: Dictionary new; + yourself \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st index 3cb23b8332..934fc7fb91 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testProjectDirtiness.st @@ -7,5 +7,5 @@ testProjectDirtiness self installBaseline. repository := self repositoryForTest. - + self assert: repository isModified equals: self shouldBeDirty \ No newline at end of file diff --git a/Iceberg.package/IceProject.class/instance/initialize.st b/Iceberg.package/IceProject.class/instance/initialize.st index 436e7a0e8d..3efe7eeff5 100644 --- a/Iceberg.package/IceProject.class/instance/initialize.st +++ b/Iceberg.package/IceProject.class/instance/initialize.st @@ -1,7 +1,11 @@ initialize initialize super initialize. - repositoryProperties := IceRepositoryProperties fromFileReference: self propertiesFileReference. + + repositoryProperties := self repository workingCopy referenceCommit isUnknownCommit + ifTrue: [IceRepositoryProperties empty] + ifFalse: [ IceRepositoryProperties fromFileReference: self propertiesFileReference ]. + repositoryProperties properties at: #format ifAbsent: [ repositoryProperties fileFormat: self defaultFileFormat ] \ No newline at end of file diff --git a/Iceberg.package/IceProject.class/instance/isDirty.st b/Iceberg.package/IceProject.class/instance/isDirty.st new file mode 100644 index 0000000000..8aef0df878 --- /dev/null +++ b/Iceberg.package/IceProject.class/instance/isDirty.st @@ -0,0 +1,3 @@ +testing +isDirty + ^ repository workingCopy referenceCommit project ~= self \ No newline at end of file diff --git a/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st b/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st index 7f6f29b76a..4b26f184e5 100644 --- a/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st +++ b/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st @@ -1,4 +1,4 @@ accessing fileSystem - ^ repository location \ No newline at end of file + ^ repository location ifNil: [ FileSystem memory ] \ No newline at end of file diff --git a/Iceberg.package/IceWorkingCopy.class/instance/isModified.st b/Iceberg.package/IceWorkingCopy.class/instance/isModified.st index a000356e9a..d12e9f218b 100644 --- a/Iceberg.package/IceWorkingCopy.class/instance/isModified.st +++ b/Iceberg.package/IceWorkingCopy.class/instance/isModified.st @@ -1,4 +1,4 @@ API-changes isModified - ^ self loadedPackages anySatisfy: [ :e | e isDirty ] \ No newline at end of file + ^ self project isDirty or:[self loadedPackages anySatisfy: [ :e | e isDirty ]] \ No newline at end of file From 2b0da0c449bbccd782fbb30a7d516cda40ec2d75 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 16:25:37 +0200 Subject: [PATCH 12/17] Fixing the fileSystem of IceWorkingCopy --- Iceberg.package/IceProject.class/instance/initialize.st | 4 +--- Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Iceberg.package/IceProject.class/instance/initialize.st b/Iceberg.package/IceProject.class/instance/initialize.st index 3efe7eeff5..0ac1b247f1 100644 --- a/Iceberg.package/IceProject.class/instance/initialize.st +++ b/Iceberg.package/IceProject.class/instance/initialize.st @@ -2,9 +2,7 @@ initialize initialize super initialize. - repositoryProperties := self repository workingCopy referenceCommit isUnknownCommit - ifTrue: [IceRepositoryProperties empty] - ifFalse: [ IceRepositoryProperties fromFileReference: self propertiesFileReference ]. + repositoryProperties := IceRepositoryProperties fromFileReference: self propertiesFileReference. repositoryProperties properties at: #format diff --git a/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st b/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st index 4b26f184e5..0456362d9d 100644 --- a/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st +++ b/Iceberg.package/IceWorkingCopy.class/instance/fileSystem.st @@ -1,4 +1,4 @@ accessing fileSystem - ^ repository location ifNil: [ FileSystem memory ] \ No newline at end of file + ^ repository location ifNil: [ FileSystem memory root ] \ No newline at end of file From a663f2b985d4139e520ca8defa8b1aaf6d20f6ef Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 16:57:21 +0200 Subject: [PATCH 13/17] Fixing the dirtiness in the memory project --- .../IceMemoryProject.class/instance/isDirty.st | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Iceberg-Memory.package/IceMemoryProject.class/instance/isDirty.st diff --git a/Iceberg-Memory.package/IceMemoryProject.class/instance/isDirty.st b/Iceberg-Memory.package/IceMemoryProject.class/instance/isDirty.st new file mode 100644 index 0000000000..8aef0df878 --- /dev/null +++ b/Iceberg-Memory.package/IceMemoryProject.class/instance/isDirty.st @@ -0,0 +1,3 @@ +testing +isDirty + ^ repository workingCopy referenceCommit project ~= self \ No newline at end of file From a11609a735ffacf15e9db3306905aaf1bcf8ae30 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Thu, 21 Jun 2018 17:49:37 +0200 Subject: [PATCH 14/17] Fixing the equals of projects --- .../IceRepositoryProperties.class/instance/^equals.st | 4 ++++ .../IceRepositoryProperties.class/instance/hash.st | 3 +++ Iceberg.package/IceProject.class/instance/^equals.st | 11 +++++++++++ .../IceProject.class/instance/commitish.st | 3 +++ Iceberg.package/IceProject.class/instance/hash.st | 4 ++++ 5 files changed, 25 insertions(+) create mode 100644 Iceberg-Libgit.package/IceRepositoryProperties.class/instance/^equals.st create mode 100644 Iceberg-Libgit.package/IceRepositoryProperties.class/instance/hash.st create mode 100644 Iceberg.package/IceProject.class/instance/^equals.st create mode 100644 Iceberg.package/IceProject.class/instance/commitish.st create mode 100644 Iceberg.package/IceProject.class/instance/hash.st diff --git a/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/^equals.st b/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/^equals.st new file mode 100644 index 0000000000..3040458155 --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/^equals.st @@ -0,0 +1,4 @@ +comparing += anotherObject + + ^ self species = anotherObject species and: [ properties = anotherObject properties ] \ No newline at end of file diff --git a/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/hash.st b/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/hash.st new file mode 100644 index 0000000000..284249c2db --- /dev/null +++ b/Iceberg-Libgit.package/IceRepositoryProperties.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ properties hash \ No newline at end of file diff --git a/Iceberg.package/IceProject.class/instance/^equals.st b/Iceberg.package/IceProject.class/instance/^equals.st new file mode 100644 index 0000000000..6b9f8d9343 --- /dev/null +++ b/Iceberg.package/IceProject.class/instance/^equals.st @@ -0,0 +1,11 @@ +comparing += anotherProject + + self species = anotherProject species ifFalse: [ ^ false ]. + + commitish = anotherProject commitish ifFalse: [ ^ false ]. + properties = anotherProject properties ifFalse: [ ^ false ]. + repository = anotherProject repository ifFalse: [ ^ false ]. + repositoryProperties = anotherProject repositoryProperties ifFalse: [ ^ false ]. + + ^ true. \ No newline at end of file diff --git a/Iceberg.package/IceProject.class/instance/commitish.st b/Iceberg.package/IceProject.class/instance/commitish.st new file mode 100644 index 0000000000..277c3020cb --- /dev/null +++ b/Iceberg.package/IceProject.class/instance/commitish.st @@ -0,0 +1,3 @@ +accessing +commitish + ^ commitish \ No newline at end of file diff --git a/Iceberg.package/IceProject.class/instance/hash.st b/Iceberg.package/IceProject.class/instance/hash.st new file mode 100644 index 0000000000..3d54307121 --- /dev/null +++ b/Iceberg.package/IceProject.class/instance/hash.st @@ -0,0 +1,4 @@ +comparing +hash + + ^ commitish hash + repository hash From 0128353d9a796e3fafe3d1dfcf0ae2bc024f6e4b Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Fri, 22 Jun 2018 15:05:27 +0200 Subject: [PATCH 15/17] This test should be configurable --- ...nstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st index d1e90845e2..c57fffc2d6 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st @@ -11,4 +11,4 @@ testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible self installBaseline. repository := self repositoryForTest. - self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) \ No newline at end of file + self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) not equals: self shouldBeDirty \ No newline at end of file From ac5ebc04bfe7b4c0ce9e2137b1c2d2bcfbd36a04 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Fri, 22 Jun 2018 16:56:51 +0200 Subject: [PATCH 16/17] Fixing the tests --- ...nstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st | 2 +- .../instance/testNewRepositoryPackagesAreClean.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st index c57fffc2d6..9419c93f1e 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible.st @@ -11,4 +11,4 @@ testInstallBaselineWhileMissingRepositoryIsInstalledIsPossible self installBaseline. repository := self repositoryForTest. - self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) not equals: self shouldBeDirty \ No newline at end of file + self assert: repository workingCopy isModified equals: self shouldBeDirty \ No newline at end of file diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st index 0f1ad86286..f123f02707 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st @@ -8,4 +8,4 @@ testNewRepositoryPackagesAreClean self installBaseline. repository := self repositoryForTest. - self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) \ No newline at end of file + self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) equals: self shouldBeDirty not \ No newline at end of file From 0698567486d8bd5608bd01905f4d0ad7d5556355 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Fri, 22 Jun 2018 17:49:39 +0200 Subject: [PATCH 17/17] Modifying tests to make them use the configurable flag --- .../instance/testNewRepositoryPackagesAreClean.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st index f123f02707..aa2dcc320b 100644 --- a/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st +++ b/Iceberg-Tests.package/IceMetacelloIntegrationTests.class/instance/testNewRepositoryPackagesAreClean.st @@ -8,4 +8,4 @@ testNewRepositoryPackagesAreClean self installBaseline. repository := self repositoryForTest. - self assert: (repository workingCopy loadedPackages allSatisfy: [ :each | each isClean ]) equals: self shouldBeDirty not \ No newline at end of file + self assert: repository workingCopy isModified equals: self shouldBeDirty \ No newline at end of file