@@ -97,6 +97,11 @@ func TestReadManifest(t *testing.T) {
9797 Type : manifest .ConnectionTypePostgresql ,
9898 ConnStr : "postgresql://{{POSTGRESQL_USERNAME}}:{{POSTGRESQL_PASSWORD}}@1.2.3.4:5432/data?sslmode=disable" ,
9999 },
100+ "my-mysql" : manifest.MysqlConnectionInfo {
101+ Name : "my-mysql" ,
102+ Type : manifest .ConnectionTypeMysql ,
103+ ConnStr : "mysql://{{MYSQL_USERNAME}}:{{MYSQL_PASSWORD}}@1.2.3.4:3306/mydb?sslmode=disable" ,
104+ },
100105 "my-dgraph-cloud" : manifest.DgraphConnectionInfo {
101106 Name : "my-dgraph-cloud" ,
102107 Type : manifest .ConnectionTypeDgraph ,
@@ -207,6 +212,20 @@ func TestPostgresConnectionInfo_Hash(t *testing.T) {
207212 }
208213}
209214
215+ func TestMysqlConnectionInfo_Hash (t * testing.T ) {
216+ connection := manifest.MysqlConnectionInfo {
217+ Name : "my-database" ,
218+ ConnStr : "mysql://{{MYSQL_USERNAME}}:{{MYSQL_PASSWORD}}@1.2.3.4:3306/mydb?sslmode=disable" ,
219+ }
220+
221+ expectedHash := "3b96055cec5bd4195901e1442c856fe5b5493b0af0dde8f64f1d14a4795f5272"
222+
223+ actualHash := connection .Hash ()
224+ if actualHash != expectedHash {
225+ t .Errorf ("Expected hash: %s, but got: %s" , expectedHash , actualHash )
226+ }
227+ }
228+
210229func TestDgraphCloudConnectionInfo_Hash (t * testing.T ) {
211230 connection := manifest.DgraphConnectionInfo {
212231 Name : "my-dgraph-cloud" ,
@@ -259,6 +278,7 @@ func TestGetVariablesFromManifest(t *testing.T) {
259278 "my-rest-api" : {"API_TOKEN" },
260279 "another-rest-api" : {"USERNAME" , "PASSWORD" },
261280 "neon" : {"POSTGRESQL_USERNAME" , "POSTGRESQL_PASSWORD" },
281+ "my-mysql" : {"MYSQL_USERNAME" , "MYSQL_PASSWORD" },
262282 "my-dgraph-cloud" : {"DGRAPH_KEY" },
263283 "my-neo4j" : {"NEO4J_USERNAME" , "NEO4J_PASSWORD" },
264284 }
0 commit comments