mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
fix: Fix tests
This commit is contained in:
parent
1bda1f76e0
commit
e18d57074d
4
.github/workflows/pr-tests.yaml
vendored
4
.github/workflows/pr-tests.yaml
vendored
@ -19,6 +19,6 @@ jobs:
|
|||||||
- name: Check Nix flake
|
- name: Check Nix flake
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
|
||||||
- name: Run tests
|
- name: Build app
|
||||||
run: nix develop --command bash -c 'go test ./...'
|
run: nix build -L
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
pname = "github.com/Myzel394/config-lsp";
|
pname = "github.com/Myzel394/config-lsp";
|
||||||
version = "v0.0.1";
|
version = "v0.0.1";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = "sha256-KhyqogTyb3jNrGP+0Zmn/nfx+WxzjgcrFOp2vivFgT0=";
|
vendorHash = "sha256-PUVmhdbmfy1FaSzLt3SIK0MtWezsjb+PL+Z5YxMMhdw=";
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
go test -v $(pwd)/...
|
go test -v $(pwd)/...
|
||||||
'';
|
'';
|
||||||
|
@ -13,6 +13,10 @@ func TestWireguardAvailable(
|
|||||||
func TestWireguardPrivateKey(
|
func TestWireguardPrivateKey(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
) {
|
) {
|
||||||
|
if !AreWireguardToolsAvailable() {
|
||||||
|
t.Skip("Wireguard tools not available")
|
||||||
|
}
|
||||||
|
|
||||||
privateKey, err := CreateNewPrivateKey()
|
privateKey, err := CreateNewPrivateKey()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -25,6 +29,10 @@ func TestWireguardPrivateKey(
|
|||||||
func TestWireguardPublicKey(
|
func TestWireguardPublicKey(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
) {
|
) {
|
||||||
|
if !AreWireguardToolsAvailable() {
|
||||||
|
t.Skip("Wireguard tools not available")
|
||||||
|
}
|
||||||
|
|
||||||
privateKey := "UPBKR0kLF2C/+Ei5fwN5KHsAcon9xfBX+RWhebYFGWg="
|
privateKey := "UPBKR0kLF2C/+Ei5fwN5KHsAcon9xfBX+RWhebYFGWg="
|
||||||
publicKey, err := CreatePublicKey(privateKey)
|
publicKey, err := CreatePublicKey(privateKey)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user