storage.feature¶
Info¶
- Parent directory
isshub/domain/contexts/code_repository/repositories/repository/features/
- Last update
Last source¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | Feature: Storing repositories
Background: Given a repository and a repository storage
Given a repository
And a repository storage
Scenario: A new repository can be saved and retrieved
When the repository is added to the repository storage
Then I can retrieve it
Scenario: A new repository cannot be saved if invalid
When the repository has some invalid content
Then I cannot add it because it's invalid
Scenario: An existing repository cannot be added
When the repository is added to the repository storage
Then it's not possible to add it again
Scenario: An existing repository can be updated
When the repository is added to the repository storage
And it is updated
Then I can retrieve its updated version
Scenario: An existing repository cannot be saved if invalid
When the repository has some invalid content
Then I cannot update it because it's invalid
Scenario: A non existing repository cannot be updated
When the repository is not added to the repository storage
Then I cannot update it because it does not exist
Scenario: An existing repository can be deleted
When the repository is added to the repository storage
And it is deleted
Then I cannot retrieve it
Scenario: An non existing repository cannot be deleted
When the repository is not added to the repository storage
Then I cannot delete it
Scenario: All repositories in same namespace can be retrieved at once
Given a namespace with no repositories in it
And a second repository, in the namespace
And a third repository, in the namespace
When the repository is added to the repository storage
And the second repository is added to the repository storage
And the third repository is added to the repository storage
Then I can retrieve the second and the third repositories at once
Scenario: No repositories returned from a namespace without repositories
Given a namespace with no repositories in it
Then I got no repositories for the namespace
Scenario: A repository cannot be added if another exists with same name in same namespace
Given a second repository with same name in the same namespace
When the repository is added to the repository storage
Then I cannot add the second one
Scenario: A repository cannot be updated if another exists with same new name in same namespace
Given a second repository in the same namespace
When the repository is added to the repository storage
And the second repository is added to the repository storage
And the second repository name is set as for the first one
Then I cannot update the second one
Scenario: A repository cannot be updated if another exists with same name in new same namespace
Given a second repository with the same name
When the repository is added to the repository storage
And the second repository is added to the repository storage
And the second repository namespace is set as for the first one
Then I cannot update the second one
Scenario: A repository can be moved from one namespace to another
Given a namespace with no repositories in it
And a second namespace with no repositories in it
When the repository is added to the repository storage
And the repository is set in the first namespace
And I change its namespace
Then the repository is no longer available in the original namespace
And the repository is available in the new namespace
|
Changes¶
feat(repository): Add domain repositories¶
- Commit
- Hash
- Date
2020-10-06 17:30:45 +0200
- Type
Added
- Stats
+80 -0
@@ -0,0 +1,80 @@
+Feature: Storing repositories
+
+ Background: Given a repository and a repository storage
+ Given a repository
+ And a repository storage
+
+ Scenario: A new repository can be saved and retrieved
+ When the repository is added to the repository storage
+ Then I can retrieve it
+
+ Scenario: A new repository cannot be saved if invalid
+ When the repository has some invalid content
+ Then I cannot add it because it's invalid
+
+ Scenario: An existing repository cannot be added
+ When the repository is added to the repository storage
+ Then it's not possible to add it again
+
+ Scenario: An existing repository can be updated
+ When the repository is added to the repository storage
+ And it is updated
+ Then I can retrieve its updated version
+
+ Scenario: An existing repository cannot be saved if invalid
+ When the repository has some invalid content
+ Then I cannot update it because it's invalid
+
+ Scenario: A non existing repository cannot be updated
+ When the repository is not added to the repository storage
+ Then I cannot update it because it does not exist
+
+ Scenario: An existing repository can be deleted
+ When the repository is added to the repository storage
+ And it is deleted
+ Then I cannot retrieve it
+
+ Scenario: An non existing repository cannot be deleted
+ When the repository is not added to the repository storage
+ Then I cannot delete it
+
+ Scenario: All repositories in same namespace can be retrieved at once
+ Given a namespace with no repositories in it
+ And a second repository, in the namespace
+ And a third repository, in the namespace
+ When the repository is added to the repository storage
+ And the second repository is added to the repository storage
+ And the third repository is added to the repository storage
+ Then I can retrieve the second and the third repositories at once
+
+ Scenario: No repositories returned from a namespace without repositories
+ Given a namespace with no repositories in it
+ Then I got no repositories for the namespace
+
+ Scenario: A repository cannot be added if another exists with same name in same namespace
+ Given a second repository with same name in the same namespace
+ When the repository is added to the repository storage
+ Then I cannot add the second one
+
+ Scenario: A repository cannot be updated if another exists with same new name in same namespace
+ Given a second repository in the same namespace
+ When the repository is added to the repository storage
+ And the second repository is added to the repository storage
+ And the second repository name is set as for the first one
+ Then I cannot update the second one
+
+ Scenario: A repository cannot be updated if another exists with same name in new same namespace
+ Given a second repository with the same name
+ When the repository is added to the repository storage
+ And the second repository is added to the repository storage
+ And the second repository namespace is set as for the first one
+ Then I cannot update the second one
+
+ Scenario: A repository can be moved from one namespace to another
+ Given a namespace with no repositories in it
+ And a second namespace with no repositories in it
+ When the repository is added to the repository storage
+ And the repository is set in the first namespace
+ And I change its namespace
+ Then the repository is no longer available in the original namespace
+ And the repository is available in the new namespace