You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2018/11/27 18:59:40 UTC
[geode] branch feature/GEODE-6068 updated: removed integration test
in favor of unit and dunit tests
This is an automated email from the ASF dual-hosted git repository.
dschneider pushed a commit to branch feature/GEODE-6068
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-6068 by this push:
new 1e2855d removed integration test in favor of unit and dunit tests
1e2855d is described below
commit 1e2855d2f7b2cbd5ede3291946c6abcbcddeaac6
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Tue Nov 27 10:59:08 2018 -0800
removed integration test in favor of unit and dunit tests
---
.../cli/DestroyMappingCommandIntegrationTest.java | 83 ----------------------
1 file changed, 83 deletions(-)
diff --git a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java b/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java
deleted file mode 100644
index 6f9896a..0000000
--- a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java
+++ /dev/null
@@ -1,83 +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 org.apache.geode.connectors.jdbc.internal.cli;
-
-import static org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
-import static org.assertj.core.api.Assertions.assertThat;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.cache.CacheFactory;
-import org.apache.geode.connectors.jdbc.internal.JdbcConnectorService;
-import org.apache.geode.connectors.jdbc.internal.configuration.RegionMapping;
-import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.management.cli.Result;
-import org.apache.geode.management.internal.cli.result.model.ResultModel;
-import org.apache.geode.test.junit.categories.JDBCConnectorTest;
-
-@Category({JDBCConnectorTest.class})
-public class DestroyMappingCommandIntegrationTest {
-
- private String regionName;
- private InternalCache cache;
- private RegionMapping mapping;
-
- private DestroyMappingCommand command;
-
- @Before
- public void setup() throws Exception {
- regionName = "testRegion";
-
- String[] params = new String[] {"param1:value1", "param2:value2"};
- mapping = new RegionMapping(regionName, null, null, null);
-
- cache = (InternalCache) new CacheFactory().set("locators", "").set("mcast-port", "0")
- .set(ENABLE_CLUSTER_CONFIGURATION, "true").create();
-
- command = new DestroyMappingCommand();
- command.setCache(cache);
- }
-
- @After
- public void tearDown() {
- cache.close();
- }
-
- @Test
- public void destroysNamedMapping() throws Exception {
- JdbcConnectorService service = cache.getService(JdbcConnectorService.class);
- service.createRegionMapping(mapping);
- assertThat(service.getMappingForRegion(regionName)).isSameAs(mapping);
-
- ResultModel result = command.destroyMapping(regionName);
-
- assertThat(result.getStatus()).isSameAs(Result.Status.OK);
- assertThat(service.getMappingForRegion(regionName)).isNull();
- }
-
- @Test
- public void returnsErrorIfNamedMappingNotFound() throws Exception {
- JdbcConnectorService service = cache.getService(JdbcConnectorService.class);
- assertThat(service.getMappingForRegion(regionName)).isNull();
-
- ResultModel result = command.destroyMapping(regionName);
- assertThat(result.getStatus()).isSameAs(Result.Status.ERROR);
-
- assertThat(service.getMappingForRegion(regionName)).isNull();
- }
-}