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

obs_test.go 1.1 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package obs
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. clitypes "gitlink.org.cn/cloudream/jcs-pub/client/types"
  7. cortypes "gitlink.org.cn/cloudream/jcs-pub/coordinator/types"
  8. )
  9. func Test_S2S(t *testing.T) {
  10. Convey("OBS", t, func() {
  11. s2s := S2STransfer{
  12. stgType: &cortypes.OBSType{
  13. Region: "cn-north-4",
  14. Endpoint: "obs.cn-north-4.myhuaweicloud.com",
  15. Bucket: "pcm3-bucket3",
  16. ProjectID: "",
  17. },
  18. cred: &cortypes.OBSCred{
  19. AK: "",
  20. SK: "",
  21. },
  22. feat: &cortypes.S2STransferFeature{},
  23. }
  24. _, err := s2s.Transfer(context.TODO(), &clitypes.UserSpaceDetail{
  25. UserSpace: clitypes.UserSpace{
  26. Storage: &cortypes.OBSType{
  27. Region: "cn-north-4",
  28. Endpoint: "obs.cn-north-4.myhuaweicloud.com",
  29. Bucket: "pcm2-bucket2",
  30. ProjectID: "",
  31. },
  32. Credential: &cortypes.OBSCred{
  33. AK: "",
  34. SK: "",
  35. },
  36. },
  37. }, clitypes.PathFromComps("test_data/test03.txt"), clitypes.PathFromComps("atest.txt"))
  38. defer s2s.Close()
  39. So(err, ShouldEqual, nil)
  40. })
  41. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。