Skip to content

Commit

Permalink
HDDS-12069. Move some CLI integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Jan 11, 2025
1 parent b89b6e0 commit 4da5309
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 196 deletions.
4 changes: 2 additions & 2 deletions hadoop-ozone/dist/src/shell/ozone/ozone
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function ozonecmd_case
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
genconf)
OZONE_CLASSNAME=org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations
OZONE_CLASSNAME=org.apache.hadoop.ozone.cli.GenerateOzoneRequiredConfigurations
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
dtutil)
Expand All @@ -230,7 +230,7 @@ function ozonecmd_case
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
checknative)
OZONE_CLASSNAME=org.apache.hadoop.ozone.shell.checknative.CheckNative
OZONE_CLASSNAME=org.apache.hadoop.ozone.cli.CheckNative
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
ratis)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone;
package org.apache.hadoop.ozone.admin;

import com.google.common.collect.Maps;
import org.apache.hadoop.hdds.annotation.InterfaceAudience;
import org.apache.hadoop.ozone.admin.OzoneAdmin;
import org.apache.hadoop.hdds.conf.DefaultConfigManager;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.scm.ScmConfig;
Expand All @@ -28,6 +27,8 @@
import org.apache.hadoop.hdds.security.symmetric.SecretKeyManager;
import org.apache.hadoop.hdds.utils.IOUtils;
import org.apache.hadoop.minikdc.MiniKdc;
import org.apache.hadoop.ozone.MiniOzoneCluster;
import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.security.UserGroupInformation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.fs.ozone;
package org.apache.hadoop.ozone.debug.om;

import org.apache.hadoop.hdds.utils.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
Expand All @@ -28,7 +28,6 @@
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.TestDataUtil;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.debug.om.PrefixParser;
import org.apache.hadoop.ozone.om.OMStorage;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.junit.jupiter.api.AfterAll;
Expand All @@ -45,7 +44,7 @@
* Test Ozone Prefix Parser.
*/
@Timeout(120)
public class TestOzoneFileSystemPrefixParser {
public class TestPrefixParser {

private static MiniOzoneCluster cluster = null;

Expand Down
4 changes: 2 additions & 2 deletions hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
</Match>
<Match>
<Class name="org.apache.hadoop.ozone.genconf.TestGenerateOzoneRequiredConfigurations"/>
<Class name="org.apache.hadoop.ozone.cli.TestGenerateOzoneRequiredConfigurations"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
</Match>
<Match>
<Class name="org.apache.hadoop.ozone.genconf.TestGenerateOzoneRequiredConfigurations"/>
<Class name="org.apache.hadoop.ozone.cli.TestGenerateOzoneRequiredConfigurations"/>
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.shell.checknative;
package org.apache.hadoop.ozone.cli;

import org.apache.hadoop.hdds.cli.GenericCli;
import org.apache.hadoop.hdds.utils.NativeLibraryLoader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.genconf;
package org.apache.hadoop.ozone.cli;

import org.apache.hadoop.hdds.cli.GenericCli;
import org.apache.hadoop.hdds.cli.HddsVersionProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* 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.
*/

/**
* Miscellaneous CLI commands.
*/
package org.apache.hadoop.ozone.cli;

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.scm;
package org.apache.hadoop.ozone.admin.scm;

import org.apache.hadoop.ozone.admin.OzoneAdmin;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionScmResponseProto;
import org.apache.hadoop.hdds.scm.client.ScmClient;
import org.apache.hadoop.ozone.admin.scm.DecommissionScmSubcommand;
import org.apache.ozone.test.GenericTestUtils;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.scm;
package org.apache.hadoop.ozone.admin.scm;

import org.apache.hadoop.hdds.scm.client.ScmClient;
import org.apache.hadoop.ozone.admin.scm.GetScmRatisRolesSubcommand;
import org.apache.ozone.test.GenericTestUtils;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.checknative;
package org.apache.hadoop.ozone.cli;

import org.apache.hadoop.ozone.shell.checknative.CheckNative;
import org.apache.ozone.test.tag.Native;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.AfterEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.genconf;
package org.apache.hadoop.ozone.cli;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import static org.assertj.core.api.Assertions.assertThat;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,7 @@
<include>org.apache.hadoop.hdds.**</include>
</includes>
<excludes>
<exclude>org.apache.hadoop.hdds.scm.cli.**</exclude>
<exclude>org.apache.hadoop.hdds.scm.container.**</exclude>
</excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
Expand All @@ -2242,12 +2243,14 @@
<include>org.apache.hadoop.ozone.**</include>
</includes>
<excludes>
<exclude>org.apache.hadoop.ozone.admin.**</exclude>
<exclude>org.apache.hadoop.ozone.client.**</exclude>
<exclude>org.apache.hadoop.ozone.container.**</exclude>
<exclude>org.apache.hadoop.ozone.debug.**</exclude>
<exclude>org.apache.hadoop.ozone.freon.**</exclude>
<exclude>org.apache.hadoop.ozone.om.**</exclude>
<exclude>org.apache.hadoop.ozone.recon.**</exclude>
<exclude>org.apache.hadoop.ozone.repair.**</exclude>
<exclude>org.apache.hadoop.ozone.shell.**</exclude>
</excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
Expand Down Expand Up @@ -2282,8 +2285,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>org.apache.hadoop.hdds.scm.cli.**</include>
<include>org.apache.hadoop.ozone.admin.**</include>
<include>org.apache.hadoop.ozone.debug.**</include>
<include>org.apache.hadoop.ozone.freon.**</include>
<include>org.apache.hadoop.ozone.repair.**</include>
<include>org.apache.hadoop.ozone.shell.**</include>
</includes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
Expand Down

0 comments on commit 4da5309

Please sign in to comment.