Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore a few silently failing tests for SQL Server #1864

Merged
merged 1 commit into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package queries.filters

import org.scalatest.{FlatSpec, Matchers}
import util.{ApiSpecBase, ProjectDsl}
import util.{ApiSpecBase, IgnoreMsSql, ProjectDsl}

class OneToOneSelfRelationRegressionSpec extends FlatSpec with Matchers with ApiSpecBase {
"Querying a 1:1 self relation with nulls" should "work on both sides" in {
// Bring back sql server when cascading rules can be set!
"Querying a 1:1 self relation with nulls" should "work on both sides" taggedAs IgnoreMsSql in {
val project = ProjectDsl.fromString {
s"""
|model User {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import util._
class SelfRelationFilterSpec extends FlatSpec with Matchers with ApiSpecBase {
override def runOnlyForCapabilities = Set(JoinRelationLinksCapability)

// Take this out when cascading rules can be set.
override def doNotRunForConnectors: Set[ConnectorTag] = Set(ConnectorTag.MsSqlConnectorTag)

val project = ProjectDsl.fromString {
connectorTag match {
case _: RelationalConnectorTag =>
Expand Down Expand Up @@ -71,6 +74,7 @@ class SelfRelationFilterSpec extends FlatSpec with Matchers with ApiSpecBase {
setupRockRelations
}

// Bring back sql server when cascading rules can be set!
"Filter Queries along self relations" should "succeed with one level " taggedAs (IgnoreMsSql) in {
val filterKurt =
s"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class OrderByDependentModelSpec extends FlatSpec with Matchers with ApiSpecBase
"""
}

// Take this out when cascading rules can be set.
override def doNotRunForConnectors: Set[ConnectorTag] = Set(ConnectorTag.MsSqlConnectorTag)

override protected def beforeEach(): Unit = {
super.beforeEach()
database.setup(project)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import org.scalatest.{FlatSpec, Matchers}
import util._

class OrderByDependentPaginationModelSpec extends FlatSpec with Matchers with ApiSpecBase {
// Take this out when cascading rules can be set.
override def doNotRunForConnectors: Set[ConnectorTag] = Set(ConnectorTag.MsSqlConnectorTag)

implicit val project: Project = SchemaDsl.fromStringV11() {
"""
|model ModelA {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ class Prisma_3078Spec extends FlatSpec with Matchers with ApiSpecBase with Schem
}
}

"A relation filter on a 1:M self relation " should "work" in {
// Bring back sql server when cascading rules can be set!
"A relation filter on a 1:M self relation " should "work" taggedAs (IgnoreMsSql) in {
for (fieldName <- Vector("field_a", "field_z")) {
val project = ProjectDsl.fromString {
s"""
Expand Down Expand Up @@ -174,7 +175,8 @@ class Prisma_3078Spec extends FlatSpec with Matchers with ApiSpecBase with Schem
}
}

"A relation filter on a N:M self relation " should "work" in {
// Bring back sql server when cascading rules can be set!
"A relation filter on a N:M self relation " should "work" taggedAs (IgnoreMsSql) in {

for (fieldName <- Vector("field_a", "field_z")) {
val project = ProjectDsl.fromString {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import util._
class DeeplyNestedSelfRelationSpec extends FlatSpec with Matchers with ApiSpecBase {
override def runOnlyForCapabilities = Set(JoinRelationLinksCapability)

"A deeply nested self relation create" should "be executed completely" in {
// Bring back sql server when cascading rules can be set!
"A deeply nested self relation create" should "be executed completely" taggedAs IgnoreMsSql in {
val project = ProjectDsl.fromString {
"""model User {
| id String @id @default(cuid())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import util._
class SameModelSelfRelationWithoutBackRelationSpec extends FlatSpec with Matchers with ApiSpecBase {
override def runOnlyForCapabilities = Set(JoinRelationLinksCapability)

"A Many to Many Self Relation" should "be accessible from only one side" in {
// Bring back sql server when cascading rules can be set!
"A Many to Many Self Relation" should "be accessible from only one side" taggedAs (IgnoreMsSql) in {
val testDataModels = {
val dm1 = """model Post {
id String @id @default(cuid())
Expand Down