Skip to content

Commit

Permalink
etcd: add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Jul 23, 2024
1 parent 233759c commit 8f8eb7b
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 0 deletions.
8 changes: 8 additions & 0 deletions system/t06_publish/drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class PublishDrop1Test(BaseTest):
"""
publish drop: existing snapshot
"""
requiresGPG2 = True
fixtureDB = True
fixturePool = True
fixtureCmds = [
Expand All @@ -25,6 +26,7 @@ class PublishDrop2Test(BaseTest):
"""
publish drop: under prefix
"""
requiresGPG2 = True
fixtureDB = True
fixturePool = True
fixtureCmds = [
Expand All @@ -46,6 +48,7 @@ class PublishDrop3Test(BaseTest):
"""
publish drop: drop one distribution
"""
requiresGPG2 = True
fixtureDB = True
fixturePool = True
fixtureCmds = [
Expand All @@ -68,6 +71,7 @@ class PublishDrop4Test(BaseTest):
"""
publish drop: drop one of components
"""
requiresGPG2 = True
fixtureDB = True
fixturePool = True
fixtureCmds = [
Expand All @@ -91,6 +95,7 @@ class PublishDrop5Test(BaseTest):
"""
publish drop: component cleanup
"""
requiresGPG2 = True
fixtureCmds = [
"aptly repo create local1",
"aptly repo create local2",
Expand Down Expand Up @@ -128,6 +133,7 @@ class PublishDrop7Test(BaseTest):
"""
publish drop: under prefix with trailing & leading slashes
"""
requiresGPG2 = True
fixtureDB = True
fixturePool = True
fixtureCmds = [
Expand All @@ -149,6 +155,7 @@ class PublishDrop8Test(BaseTest):
"""
publish drop: skip component cleanup
"""
requiresGPG2 = True
fixtureCmds = [
"aptly repo create local1",
"aptly repo create local2",
Expand Down Expand Up @@ -178,6 +185,7 @@ class PublishDrop9Test(BaseTest):
"""
publish drop: component cleanup after first cleanup skipped
"""
requiresGPG2 = True
fixtureCmds = [
"aptly repo create local1",
"aptly repo create local2",
Expand Down
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop1TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop2TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop3TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop4TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop5TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop6TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop7TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop8TestEtcd_gold
1 change: 1 addition & 0 deletions system/t13_etcd/PublishDrop9TestEtcd_gold
92 changes: 92 additions & 0 deletions system/t13_etcd/drop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# reuse existing tests:
from t06_publish.drop import PublishDrop1Test, \
PublishDrop2Test, \
PublishDrop3Test, \
PublishDrop4Test, \
PublishDrop5Test, \
PublishDrop6Test, \
PublishDrop7Test, \
PublishDrop8Test, \
PublishDrop9Test

TEST_IGNORE = ["PublishDrop1Test",
"PublishDrop2Test",
"PublishDrop3Test",
"PublishDrop4Test",
"PublishDrop5Test",
"PublishDrop6Test",
"PublishDrop7Test",
"PublishDrop8Test",
"PublishDrop9Test"]


class PublishDrop1TestEtcd(PublishDrop1Test):
"""
publish drop: existing snapshot
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop2TestEtcd(PublishDrop2Test):
"""
publish drop: under prefix
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop3TestEtcd(PublishDrop3Test):
"""
publish drop: drop one distribution
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop4TestEtcd(PublishDrop4Test):
"""
publish drop: drop one of components
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop5TestEtcd(PublishDrop5Test):
"""
publish drop: component cleanup
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop6TestEtcd(PublishDrop6Test):
"""
publish drop: no publish
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop7TestEtcd(PublishDrop7Test):
"""
publish drop: under prefix with trailing & leading slashes
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop8TestEtcd(PublishDrop8Test):
"""
publish drop: skip component cleanup
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"


class PublishDrop9TestEtcd(PublishDrop9Test):
"""
publish drop: component cleanup after first cleanup skipped
"""
databaseType = "etcd"
databaseUrl = "127.0.0.1:2379"

0 comments on commit 8f8eb7b

Please sign in to comment.