forked from apache/ozone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88b88ff
commit c059858
Showing
4 changed files
with
130 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
...ne/dist/src/main/compose/upgrade/upgrades/non-rolling-upgrade/callbacks/1.5.0/callback.sh
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,30 @@ | ||
#!/usr/bin/env bash | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
source "$TEST_DIR"/testlib.sh | ||
|
||
with_this_version_pre_finalized() { | ||
# New layout features were added in this version, so OM and SCM should be | ||
# pre-finalized. | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-check-finalization" --include pre-finalized upgrade/check-finalization.robot | ||
# Test that EC is disabled when pre-finalized. | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-hsync" --include pre-finalized-hsync-tests hsync/upgrade-hsync-check.robot | ||
} | ||
|
||
with_this_version_finalized() { | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-hsync" --include post-finalized-hsync-tests hsync/upgrade-hsync-check.robot | ||
} |
62 changes: 62 additions & 0 deletions
62
hadoop-ozone/dist/src/main/smoketest/hsync/hsync-setup.robot
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,62 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
*** Settings *** | ||
Documentation Test setup for HSync. | ||
Library OperatingSystem | ||
Library String | ||
Library BuiltIn | ||
Resource ../commonlib.robot | ||
|
||
*** Variables *** | ||
${VOLUME} | ||
${BUCKET} | ||
${KEY_ONE} | ||
${KEY_TWO} | ||
|
||
*** Keywords *** | ||
Create volume | ||
${random} = Generate Random String 5 [LOWER] | ||
${volume} = Set Variable vol-${random} | ||
${result} = Execute ozone sh volume create /${volume} | ||
Should not contain ${result} Failed | ||
[Return] ${volume} | ||
|
||
Create bucket | ||
[Arguments] ${volume} ${bucket_layout} | ||
${random} = Generate Random String 5 [LOWER] | ||
${bucket} = Set Variable buc-${random} | ||
${result} = Execute ozone sh bucket create -l ${bucket_layout} /${volume}/${bucket} | ||
Should not contain ${result} Failed | ||
[Return] ${bucket} | ||
|
||
Create key | ||
[Arguments] ${volume} ${bucket} ${file} | ||
${random} = Generate Random String 5 [LOWER] | ||
${key} = Set Variable key-${random} | ||
${result} = Execute ozone sh key put /${volume}/${bucket}/${key} ${file} | ||
[Return] ${key} | ||
|
||
Setup volume and bucket | ||
${volume} = Create Volume | ||
Set Suite Variable ${VOLUME} ${volume} | ||
${bucket} = Create bucket ${VOLUME} FILE_SYSTEM_OPTIMIZED | ||
Set Suite Variable ${BUCKET} ${bucket} | ||
|
||
Keys creation | ||
${key_one} = Create key ${VOLUME} ${BUCKET} /etc/hosts | ||
Set Suite Variable ${KEY_ONE} ${key_one} | ||
${key_two} = Create key ${VOLUME} ${BUCKET} /etc/os-release | ||
Set Suite Variable ${KEY_TWO} ${key_two} |
36 changes: 36 additions & 0 deletions
36
hadoop-ozone/dist/src/main/smoketest/hsync/upgrade-hsync-check.robot
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,36 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
*** Settings *** | ||
Documentation Test HSync during upgrade | ||
Library OperatingSystem | ||
Resource hsync-setup.robot | ||
Suite Setup Run Keyword if '${SECURITY_ENABLED}' == 'true' Kinit test user testuser testuser.keytab | ||
Test Timeout 5 minutes | ||
|
||
*** Test Cases *** | ||
Test HSync Prior To Finalization | ||
[Tags] pre-finalized-hsync-tests | ||
Setup volume and bucket | ||
Keys creation | ||
${result} = Execute ozone debug recover --path=ofs://om/${VOLUME}/${BUCKET}/${KEY_ONE} | ||
Should contain ${result} NOT_SUPPORTED_OPERATION | ||
|
||
Test HSync After Finalization | ||
[Tags] post-finalized-hsync-tests | ||
Setup volume and bucket | ||
Keys creation | ||
${result} = Execute ozone debug recover --path=ofs://om/${VOLUME}/${BUCKET}/${KEY_ONE} | ||
Should contain ${result} Lease recovery SUCCEEDED |