25 lines
503 B
Go
25 lines
503 B
Go
package repository
|
|
|
|
import (
|
|
"google.golang.org/protobuf/proto"
|
|
proto2 "joylink.club/rtsssimulation/repository/model/proto"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestBuildRepository(t *testing.T) {
|
|
bytes, err := os.ReadFile("./repo.bin")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
source := &proto2.Repository{}
|
|
err = proto.Unmarshal(bytes, source)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
repo, err := BuildRepository(source)
|
|
simulation, err := BuildSimulation(source.Id, source.Version)
|
|
println(repo)
|
|
println(simulation)
|
|
}
|