This is an automated email from the ASF dual-hosted git repository.
rafael pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new 85c88e0 Remove class snapshot data factory test (#2813)
85c88e0 is described below
commit 85c88e08a7f290a03a88f7a5a39b2b91f3e72973
Author: Rafael Weingärtner <[email protected]>
AuthorDate: Mon Aug 20 10:16:07 2018 -0300
Remove class snapshot data factory test (#2813)
* rename package from "src" to "org.apache.cloudstack.storage.vmsnapshot"
* Remove Empty test class "SnapshotDataFactoryTest"
* Remove redundant imports (importing a class from its own package)
---
.../vmsnapshot}/VMSnapshotStrategyTest.java | 22 +++++-------
.../src/test/java/src/SnapshotDataFactoryTest.java | 42 ----------------------
2 files changed, 9 insertions(+), 55 deletions(-)
diff --git
a/engine/storage/snapshot/src/test/java/src/VMSnapshotStrategyTest.java
b/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/vmsnapshot/VMSnapshotStrategyTest.java
similarity index 97%
rename from
engine/storage/snapshot/src/test/java/src/VMSnapshotStrategyTest.java
rename to
engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/vmsnapshot/VMSnapshotStrategyTest.java
index 22cf9c1..4420c19 100644
--- a/engine/storage/snapshot/src/test/java/src/VMSnapshotStrategyTest.java
+++
b/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/vmsnapshot/VMSnapshotStrategyTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package src;
+package org.apache.cloudstack.storage.vmsnapshot;
import java.io.IOException;
import java.util.ArrayList;
@@ -25,8 +25,10 @@ import java.util.List;
import javax.inject.Inject;
-import junit.framework.TestCase;
-
+import org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.storage.to.VolumeObjectTO;
+import org.apache.cloudstack.test.utils.SpringUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -43,13 +45,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
-import org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-import org.apache.cloudstack.storage.to.VolumeObjectTO;
-import org.apache.cloudstack.storage.vmsnapshot.DefaultVMSnapshotStrategy;
-import org.apache.cloudstack.storage.vmsnapshot.VMSnapshotHelper;
-import org.apache.cloudstack.test.utils.SpringUtils;
-
import com.cloud.agent.AgentManager;
import com.cloud.agent.api.Command;
import com.cloud.agent.api.CreateVMSnapshotAnswer;
@@ -76,6 +71,8 @@ import com.cloud.vm.snapshot.VMSnapshot;
import com.cloud.vm.snapshot.VMSnapshotVO;
import com.cloud.vm.snapshot.dao.VMSnapshotDao;
+import junit.framework.TestCase;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class)
public class VMSnapshotStrategyTest extends TestCase {
@@ -245,9 +242,8 @@ public class VMSnapshotStrategyTest extends TestCase {
}
@Configuration
- @ComponentScan(basePackageClasses = {NetUtils.class,
DefaultVMSnapshotStrategy.class},
- includeFilters = {@ComponentScan.Filter(value =
TestConfiguration.Library.class, type = FilterType.CUSTOM)},
- useDefaultFilters = false)
+ @ComponentScan(basePackageClasses = {NetUtils.class,
DefaultVMSnapshotStrategy.class}, includeFilters = {
+ @ComponentScan.Filter(value = TestConfiguration.Library.class,
type = FilterType.CUSTOM)}, useDefaultFilters = false)
public static class TestConfiguration extends
SpringUtils.CloudStackTestConfiguration {
public static class Library implements TypeFilter {
diff --git
a/engine/storage/snapshot/src/test/java/src/SnapshotDataFactoryTest.java
b/engine/storage/snapshot/src/test/java/src/SnapshotDataFactoryTest.java
deleted file mode 100644
index 6edaff1..0000000
--- a/engine/storage/snapshot/src/test/java/src/SnapshotDataFactoryTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-package src;
-
-import junit.framework.TestCase;
-
-import org.junit.Before;
-import org.junit.Test;
-
-//@RunWith(SpringJUnit4ClassRunner.class)
-//@ContextConfiguration(locations =
"classpath:/SnapshotManagerTestContext.xml")
-public class SnapshotDataFactoryTest extends TestCase {
- // @Inject SnapshotDataFactory snapshotFactory;
-
- @Before
- public void setup() throws Exception {
- // ComponentContext.initComponentsLifeCycle();
-
- }
-
- @Test
- public void testGestSnapshot() {
- // snapshotFactory.getSnapshot(snapshotId);
- }
-
-}