Skip to content

Commit

Permalink
Spock Testcontainers annotation is now inherited (#4053)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlefevre committed Jul 19, 2021
1 parent bfd61d7 commit b837bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package org.testcontainers.spock
import org.spockframework.runtime.extension.ExtensionAnnotation

import java.lang.annotation.ElementType
import java.lang.annotation.Inherited
import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
import java.lang.annotation.Target

@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target([ElementType.TYPE, ElementType.METHOD])
@ExtensionAnnotation(TestcontainersExtension)
@interface Testcontainers {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import org.testcontainers.containers.PostgreSQLContainer
import spock.lang.Shared

/**
* This test verifies that integration tests can subclass each other
* This test verifies that integration tests can subclass each other.
* Also verifies that the @Testcontainers annotation is inherited.
*/
@Testcontainers
class TestHierarchyIT extends MySqlContainerIT {

@Shared
Expand Down

0 comments on commit b837bb1

Please sign in to comment.