You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2016/11/02 17:49:02 UTC

[GitHub] brooklyn-server pull request #399: Adds TestCaseYamlTest

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/399

    Adds TestCaseYamlTest

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server test-yaml-testCase

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/399.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #399
    
----
commit 54adf41d3972ed8e02ad7c254be016c3bcce858c
Author: Aled Sage <al...@gmail.com>
Date:   2016-11-02T17:48:05Z

    Adds TestCaseYamlTest

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #399: Adds TestCaseYamlTest

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/399


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #399: Adds TestCaseYamlTest

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/399#discussion_r86290910
  
    --- Diff: test-framework/src/test/java/org/apache/brooklyn/test/framework/yaml/TestCaseYamlTest.java ---
    @@ -0,0 +1,105 @@
    +/*
    + * 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.brooklyn.test.framework.yaml;
    +
    +import org.apache.brooklyn.camp.brooklyn.AbstractYamlRebindTest;
    +import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
    +import org.apache.brooklyn.entity.machine.MachineEntity;
    +import org.apache.brooklyn.entity.stock.BasicApplication;
    +import org.apache.brooklyn.test.framework.TestCase;
    +import org.apache.brooklyn.test.framework.TestEffector;
    +import org.apache.brooklyn.test.framework.TestSensor;
    +import org.apache.brooklyn.test.framework.TestSshCommand;
    +import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import org.testng.annotations.AfterMethod;
    +import org.testng.annotations.BeforeMethod;
    +import org.testng.annotations.Test;
    +
    +//Checks that the test cases work in YAML
    +@Test
    +public class TestCaseYamlTest extends AbstractYamlRebindTest {
    +    
    +    // TODO Would like this test to be in brooklyn-camp, but that would create a circular dependency.
    +    // brooklyn-test-framework depends on brooklyn-camp.
    --- End diff --
    
    I assume it depends on `brooklyn-camp` just for the tests? That's the problem with other modules as well - we want the functionality tested in YAML, but the code has nothing to do with CAMP otherwise. That's the reason why `brooklyn-camp`'s tests are huge - they are testing other's modules code through YAML.
    
    I think the way to go is to create a camp-itest module just for tests like this.
    
    On the other hand the YAML is just an alternative spec description so could we just use in-java specs to achieve the same goal?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---