Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package queries_test
import (
"testing"
m "fiskerinc.com/modules/common"
"fiskerinc.com/modules/db/queries"
)
func TestCreateSelectQuery(t *testing.T) {
ratePlanDB := queries.RatePlanTmobile{}
ratePlanModel := []m.RatePlanTMobile{}
q := ratePlanDB.CreateSelectQuery("US", &ratePlanModel)
q_str := queryToString(q)
expected := `SELECT "r"."country", "r"."product_id", "r"."plan_name", "r"."created_at", "r"."updated_at" FROM "rate_plan_tmobile" AS "r" WHERE (country = 'US')`
if q_str != expected {
t.Errorf("Expected the query string %s, but got %s.", expected, q_str)
}
}