package http

import (
	"fmt"
	"netease_control_center/globals"
	"testing"
)

func TestPostBackupFile(t *testing.T) {
	var data []byte = []byte("hello world!")

	id := "thisiswzjfile"

	globals.BuildVersion = "1234"
	globals.BuildDate = "2345"
	globals.Uuid = "0-D8B870AC67EC73FF"

	err := PostBackupFile(id, string(data))

	fmt.Println(err)

	var req HttpReqGetBackupFile
	var rsp HttpRspGetBackupFile
	req.VboxMac = id

	HttpPostAuto(req, &rsp)

	fmt.Println(rsp)

	//http.Get("http://nos.netease.com/vbox-resource/4e1cf1ac-e403-40d9-b292-507964c47576lanyulin?Signature=gj5hi%2Ff7ktSW5WFXwm6KzCCARuqDLpr1D6g9%2B3Wngmg%3D&Expires=1505639330&NOSAccessKeyId=742041648f6941a19eea2ef76c1f2fea")
}
