Skip to content

Commit

Permalink
Revert "Planetscale test connector"
Browse files Browse the repository at this point in the history
This reverts commit 410bffc.
  • Loading branch information
miguelff committed Nov 20, 2023
1 parent 0a516f6 commit 6ae312b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod metrics {
Sqlite => assert_eq!(total_queries, 9),
SqlServer(_) => assert_eq!(total_queries, 17),
MongoDb(_) => assert_eq!(total_queries, 5),
CockroachDb(_) | Planetscale => (), // not deterministic
CockroachDb(_) => (), // not deterministic
MySql(_) => assert_eq!(total_queries, 12),
Vitess(_) => assert_eq!(total_queries, 11),
Postgres(_) => assert_eq!(total_queries, 7),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ mod views {
=> {
r#"CREATE VIEW "TestView" AS SELECT "TestModel".id, "TestModel"."firstName", "TestModel"."lastName", CONCAT("TestModel"."firstName", ' ', "TestModel"."lastName") as "fullName" From "TestModel""#.to_owned()
}
ConnectorVersion::MySql(_) | ConnectorVersion::Vitess(_) | ConnectorVersion::Planetscale
ConnectorVersion::MySql(_) | ConnectorVersion::Vitess(_)
=> {
r#"CREATE VIEW TestView AS SELECT TestModel.*, CONCAT(TestModel.firstName, ' ', TestModel.lastName) AS "fullName" FROM TestModel"#.to_owned()
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::connector_tag::PlanetscaleConnectorTag;
use crate::{
CockroachDbConnectorTag, ConnectorTag, ConnectorVersion, MongoDbConnectorTag, MySqlConnectorTag,
PostgresConnectorTag, SqlServerConnectorTag, SqliteConnectorTag, TestResult, VitessConnectorTag,
Expand Down Expand Up @@ -203,8 +202,7 @@ impl TestConfig {
| Ok(ConnectorVersion::MongoDb(Some(_)))
| Ok(ConnectorVersion::CockroachDb(Some(_)))
| Ok(ConnectorVersion::Postgres(Some(_)))
| Ok(ConnectorVersion::Sqlite)
| Ok(ConnectorVersion::Planetscale) => (),
| Ok(ConnectorVersion::Sqlite) => (),
Err(err) => exit_with_message(&err.to_string()),
}

Expand Down Expand Up @@ -286,7 +284,6 @@ impl TestConfig {
ConnectorVersion::Sqlite => &SqliteConnectorTag,
ConnectorVersion::CockroachDb(_) => &CockroachDbConnectorTag,
ConnectorVersion::Vitess(_) => &VitessConnectorTag,
ConnectorVersion::Planetscale => &PlanetscaleConnectorTag,
};

Ok((tag, version))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ mod cockroachdb;
mod js;
mod mongodb;
mod mysql;
mod planetscale;
mod postgres;
mod sql_server;
mod sqlite;
Expand All @@ -14,7 +13,6 @@ pub(crate) use cockroachdb::*;
pub(crate) use js::*;
pub(crate) use mongodb::*;
pub(crate) use mysql::*;
pub(crate) use planetscale::*;
pub(crate) use postgres::*;
pub(crate) use sql_server::*;
pub(crate) use sqlite::*;
Expand Down Expand Up @@ -201,8 +199,6 @@ pub(crate) fn connection_string(

ConnectorVersion::Vitess(Some(VitessVersion::V8_0)) => "mysql://root@localhost:33807/test".into(),
ConnectorVersion::Vitess(None) => unreachable!("A versioned connector must have a concrete version to run."),

ConnectorVersion::Planetscale => "mysql://root@localhost:33577/test".into(),
}
}

Expand All @@ -217,7 +213,6 @@ pub enum ConnectorVersion {
Sqlite,
CockroachDb(Option<CockroachDbVersion>),
Vitess(Option<VitessVersion>),
Planetscale,
}

impl ConnectorVersion {
Expand All @@ -239,7 +234,6 @@ impl ConnectorVersion {
(CockroachDb(a), CockroachDb(b)) => versions_match(a, b),
(Vitess(a), Vitess(b)) => versions_match(a, b),
(Sqlite, Sqlite) => true,
(Planetscale, Planetscale) => true,

(MongoDb(..), _)
| (_, MongoDb(..))
Expand All @@ -251,8 +245,6 @@ impl ConnectorVersion {
| (_, CockroachDb(..))
| (Vitess(..), _)
| (_, Vitess(..))
| (Planetscale, _)
| (_, Planetscale)
| (Postgres(..), _)
| (_, Postgres(..)) => false,
}
Expand Down Expand Up @@ -284,7 +276,6 @@ impl fmt::Display for ConnectorVersion {
None => "Vitess (unknown)".to_string(),
},
Self::CockroachDb(_) => "CockroachDB".to_string(),
Self::Planetscale => "Planetscale".to_string(),
};

write!(f, "{printable}")
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion query-engine/connector-test-kit-rs/test-configs/planetscale
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"connector": "planetscale",
"connector": "vitess",
"version": "8.0",
"driver_adapter": "planetscale",
"driver_adapter_config": { "proxyUrl": "http://root:root@127.0.0.1:8085" },
"external_test_executor": "default"
Expand Down

0 comments on commit 6ae312b

Please sign in to comment.