rafaelweingartner closed pull request #2813: Remove class snapshot data factory
test
URL: https://github.com/apache/cloudstack/pull/2813
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 22cf9c1d52b..4420c19d6a0 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 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.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.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 void testDeleteVMSnapshot() throws
AgentUnavailableException, OperationTi
}
@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 6edaff1ce4e..00000000000
--- 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);
- }
-
-}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services