You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
746 B

  1. package dameng
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/filer/store_test"
  4. "testing"
  5. )
  6. func TestStore(t *testing.T) {
  7. // run "make test_ydb" under docker folder.
  8. // to set up local env
  9. store := &DamengStore{}
  10. store.initialize("localhost", `MERGE INTO %s AS target
  11. USING (SELECT ? AS dirhash, ? AS name, ? AS directory, ? AS meta FROM dual) AS source
  12. ON (target.dirhash = source.dirhash AND target.name = source.name)
  13. WHEN MATCHED THEN
  14. UPDATE SET target.meta = source.meta
  15. WHEN NOT MATCHED THEN
  16. INSERT (dirhash, name, directory, meta)
  17. VALUES (source.dirhash, source.name, source.directory, source.meta);`,
  18. true, "SYSDBA", "SYSDBA001", "localhost", 5236,
  19. "seaweedfs", 100, 2, 10, false)
  20. store_test.TestFilerStore(t, store)
  21. }