-
Notifications
You must be signed in to change notification settings - Fork 84
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 #182 from scality/bugfix/ZENKO-699_Fix_Lifecycle_Test
bug(zenko-699): Fix Lifecycle Test
- Loading branch information
Showing
5 changed files
with
93 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
nodeCount: &nodeCount 1 | ||
|
||
ingress: | ||
enabled: true | ||
hosts: | ||
- "" | ||
|
||
prometheus: | ||
rbac: | ||
create: false | ||
serviceAccounts: | ||
alertmanager: | ||
name: default | ||
create: false | ||
nodeExporter: | ||
name: default | ||
create: false | ||
kubeStateMetrics: | ||
name: default | ||
create: false | ||
pushgateway: | ||
name: default | ||
create: false | ||
server: | ||
name: default | ||
create: false | ||
|
||
redis-ha: | ||
rbac: | ||
create: false | ||
serviceAccount: | ||
create: false | ||
name: default | ||
replicas: | ||
servers: *nodeCount | ||
sentinels: *nodeCount | ||
|
||
cloudserver-front: | ||
image: | ||
pullPolicy: Always | ||
orbit: | ||
endpoint: "http://ciutil-orbit-simulator:4222" | ||
mode: "poll" | ||
mongodb: | ||
replicas: *nodeCount | ||
|
||
|
||
backbeat: | ||
mongodb: | ||
replicas: *nodeCount | ||
lifecycle: | ||
conductor: | ||
cronRule: "0 */1 * * * *" | ||
|
||
zenko-filer: | ||
mongodb: | ||
replicas: *nodeCount | ||
|
||
zenko-queue: | ||
rbac: | ||
enabled: false | ||
replicas: *nodeCount | ||
kafkaHeapOptions: "-Xms256M" | ||
configurationOverrides: | ||
"offsets.topic.replication.factor": *nodeCount | ||
"min.insync.replicas": *nodeCount | ||
|
||
zenko-quorum: | ||
replicaCount: *nodeCount | ||
env: | ||
ZK_HEAP_SIZE: "256M" | ||
|
||
mongodb-replicaset: | ||
replicaSet: rs0 | ||
replicas: *nodeCount |
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,19 +1,22 @@ | ||
import time | ||
|
||
import pytest | ||
import zenko_e2e.conf as conf | ||
|
||
from datetime import datetime | ||
from ..fixtures import * | ||
from .. import conf | ||
|
||
|
||
@pytest.mark.skip(reason='This test requires manual work to complete') | ||
def test_expiration(expiring_bucket, testfile, objkey): | ||
util.mark_test('LIFECYCLE EXPIRATION') | ||
expiry, bucket = expiring_bucket # pylint: disable=unused-variable | ||
bucket.put_object( | ||
Body=testfile, | ||
Key=objkey | ||
) | ||
wait_time = 0 | ||
now = datetime.utcnow() | ||
if expiry > now: | ||
wait_time = expiry - now | ||
wait_time += conf.EXPIRY_INTERVAL | ||
print('Waiting %i secs for lifecyle to run' % wait_time.total_seconds()) | ||
assert util.check_object(objkey, testfile, bucket) | ||
time.sleep(conf.EXPIRY_DELTA.total_seconds() + 10) | ||
time.sleep(wait_time.total_seconds()) | ||
assert not util.check_object(objkey, testfile, bucket) |
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