I have installed today free5gc on a fresh Ubuntu 20.04.5 VM, per wiki installation instructions and was able to run TestRegistration.
For the first time, it automatically installed some go packages. Please find below test output snippet.
./test.sh TestRegistration
2023-02-21T11:36:28Z [INFO][UPF][Main] UPF version:
free5GC version: v3.2.1
build time: 2023-02-21T11:31:36Z
commit hash: 4972fffb
commit time: 2022-06-29T05:46:33Z
go version: go1.17.8 linux/amd64
...
...
2023-02-21T11:36:28Z [INFO][UPF][Cfg] ==================================================
2023-02-21T11:36:28Z [INFO][UPF][Main] Log level is set to [info] level
2023-02-21T11:36:28Z [INFO][UPF][Main] starting Gtpu Forwarder [gtp5g]
2023-02-21T11:36:28Z [INFO][UPF][Main] GTP Address: "10.200.200.102:2152"
2023-02-21T11:36:28Z [INFO][UPF][Buff] buff server started
2023-02-21T11:36:28Z [INFO][UPF][Pfcp][10.200.200.101:8805] starting pfcp server
2023-02-21T11:36:28Z [INFO][UPF][Pfcp][10.200.200.101:8805] pfcp server started
2023-02-21T11:36:28Z [INFO][UPF][Main] UPF started
go: downloading github.com/calee0219/fatal v0.0.1
go: downloading golang.org/x/net v0.0.0-20211020060615-d418f374d309
go: downloading github.com/go-ping/ping v0.0.0-20210506233800-ff8be3320020
go: downloading github.com/stretchr/testify v1.7.0
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
Run TestRegistration
2023-02-21T11:37:08Z [INFO][NRF][CFG] config version [1.0.1]
2023-02-21T11:37:08Z [INFO][AMF][CFG] config version [1.0.3]
2023-02-21T11:37:08Z [INFO][SMF][CFG] SMF config version [1.0.2]
2023-02-21T11:37:08Z [INFO][SMF][CFG] UE-Routing config version [1.0.1]
2023-02-21T11:37:08Z [INFO][UDR][CFG] config version [1.0.1]
2023-02-21T11:37:08Z [INFO][PCF][CFG] config version [1.0.1]
2023-02-21T11:37:08Z [INFO][UDM][CFG] config version [1.0.2]
2023-02-21T11:37:08Z [INFO][NSSF][CFG] config version [1.0.1]
2023-02-21T11:37:08Z [INFO][AUSF][CFG] config version [1.0.2]
2023-02-21T11:37:08Z [INFO][NRF][Init] NRF Log level is set to [info] level
...
...
--- PASS: TestRegistration (9.46s)
PASS
ok test 11.113s
2023-02-21T11:37:22Z [INFO][UPF][Main] Shutdown UPF ...
2023-02-21T11:37:22Z [INFO][UPF][Pfcp][10.200.200.101:8805] Stopping pfcp server
...
...