mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 15:05:28 +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
|
||||
run: nix flake check
|
||||
|
||||
- name: Run tests
|
||||
run: nix develop --command bash -c 'go test ./...'
|
||||
- name: Build app
|
||||
run: nix build -L
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
pname = "github.com/Myzel394/config-lsp";
|
||||
version = "v0.0.1";
|
||||
src = ./.;
|
||||
vendorHash = "sha256-KhyqogTyb3jNrGP+0Zmn/nfx+WxzjgcrFOp2vivFgT0=";
|
||||
vendorHash = "sha256-PUVmhdbmfy1FaSzLt3SIK0MtWezsjb+PL+Z5YxMMhdw=";
|
||||
checkPhase = ''
|
||||
go test -v $(pwd)/...
|
||||
'';
|
||||
|
@ -13,6 +13,10 @@ func TestWireguardAvailable(
|
||||
func TestWireguardPrivateKey(
|
||||
t *testing.T,
|
||||
) {
|
||||
if !AreWireguardToolsAvailable() {
|
||||
t.Skip("Wireguard tools not available")
|
||||
}
|
||||
|
||||
privateKey, err := CreateNewPrivateKey()
|
||||
|
||||
if err != nil {
|
||||
@ -25,6 +29,10 @@ func TestWireguardPrivateKey(
|
||||
func TestWireguardPublicKey(
|
||||
t *testing.T,
|
||||
) {
|
||||
if !AreWireguardToolsAvailable() {
|
||||
t.Skip("Wireguard tools not available")
|
||||
}
|
||||
|
||||
privateKey := "UPBKR0kLF2C/+Ei5fwN5KHsAcon9xfBX+RWhebYFGWg="
|
||||
publicKey, err := CreatePublicKey(privateKey)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user