Skip to content

Commit

Permalink
Add disabled tests for issue #1873
Browse files Browse the repository at this point in the history
  • Loading branch information
pway99 authored and PatrickViry committed Jun 23, 2022
1 parent 663a2fc commit 90294ce
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.openrewrite.yaml

import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.io.TempDir
import org.junit.jupiter.params.ParameterizedTest
Expand All @@ -33,6 +34,49 @@ class ChangePropertyKeyTest : YamlRecipeTest {
null
)

@Disabled
@Issue("https://github.com/openrewrite/rewrite/issues/1873")
@Test
fun `shorter new key with indented config`() = assertChanged(
recipe = ChangePropertyKey("a.b.c.d.e", "x.y", null, null),
before = """
a:
b:
c:
d:
e:
child: true
""",
after = """
x.y:
child: true
"""
/* actual:
x.y:
child: true
*/
)

@Disabled
@Issue("https://github.com/openrewrite/rewrite/issues/1873")
@Test
fun `longer new key with indented config`() = assertChanged(
recipe = ChangePropertyKey("x.y", "a.b.c.d.e", null, null),
before = """
x:
y:
child: true
""",
after = """
a.b.c.d.e:
child: true
"""
/* actual:
a.b.c.d.e:
child: true
*/
)

@Test
fun singleEntry() = assertChanged(
before = "management.metrics.binders.files.enabled: true",
Expand Down

0 comments on commit 90294ce

Please sign in to comment.